This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaseModelResource(ModelResource): | |
@classmethod | |
def get_fields(cls, fields=None, excludes=None): | |
""" | |
Unfortunately we must override this method because tastypie ignores 'blank' attribute | |
on model fields. | |
Here we invoke an insane workaround hack due to metaclass inheritance issues: | |
http://stackoverflow.com/questions/12757468/invoking-super-in-classmethod-called-from-metaclass-new | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Terminal color definitions | |
class fg: | |
BLACK = '\033[30m' | |
RED = '\033[31m' | |
GREEN = '\033[32m' | |
YELLOW = '\033[33m' | |
BLUE = '\033[34m' | |
MAGENTA = '\033[35m' | |
CYAN = '\033[36m' |