mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-01-03 01:15:57 +10:00
25 lines
705 B
Python
25 lines
705 B
Python
__package__ = 'archivebox.machine'
|
|
|
|
from django.apps import AppConfig
|
|
|
|
|
|
class MachineConfig(AppConfig):
|
|
default_auto_field = 'django.db.models.BigAutoField'
|
|
|
|
name = 'archivebox.machine'
|
|
label = 'machine' # Explicit label for migrations
|
|
verbose_name = 'Machine Info'
|
|
|
|
def ready(self):
|
|
"""Import models to register state machines with the registry"""
|
|
import sys
|
|
|
|
# Skip during makemigrations to avoid premature state machine access
|
|
if 'makemigrations' not in sys.argv:
|
|
from archivebox.machine import models # noqa: F401
|
|
|
|
|
|
def register_admin(admin_site):
|
|
from archivebox.machine.admin import register_admin
|
|
register_admin(admin_site)
|