apps.py 489 B

123456789101112131415
  1. from django.apps import AppConfig
  2. class CrawlsConfig(AppConfig):
  3. default_auto_field = "django.db.models.BigAutoField"
  4. name = "archivebox.crawls"
  5. label = "crawls"
  6. def ready(self):
  7. """Import models to register state machines with the registry"""
  8. import sys
  9. # Skip during makemigrations to avoid premature state machine access
  10. if 'makemigrations' not in sys.argv:
  11. from archivebox.crawls.models import CrawlMachine # noqa: F401