cmsmanage/doorcontrol/apps.py

18 lines
448 B
Python
Raw Normal View History

from django.apps import AppConfig
from django.db.models.signals import post_migrate
def post_migrate_callback(sender, **kwargs):
from .tasks.scrapehidevents import schedule_tasks
schedule_tasks()
class DoorControlConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "doorcontrol"
verbose_name = "Door Control"
def ready(self):
post_migrate.connect(post_migrate_callback, sender=self)