Skip to content

apps

old_default = JSONEncoder.default module-attribute

TasksAppConfig

Bases: AppConfig

Source code in tasks/apps.py
18
19
20
21
22
23
class TasksAppConfig(AppConfig):
    name = 'tasks'

    def ready(self):
        # noinspection PyUnresolvedReferences
        import tasks.signals

name = 'tasks' class-attribute

ready()

Source code in tasks/apps.py
21
22
23
def ready(self):
    # noinspection PyUnresolvedReferences
    import tasks.signals

new_default(self, obj)

Source code in tasks/apps.py
 9
10
11
12
def new_default(self, obj):
    if isinstance(obj, UUID):
        return str(obj)
    return old_default(self, obj)