apps.py
1 from django.apps import AppConfig 2 3 4 class DjangoMagicAuthorizeConfig(AppConfig): 5 default_auto_field = "django.db.models.BigAutoField" 6 name = "django_magic_authorization" 7 verbose_name = "Django Magic Authorization" 8 9 def ready(self): 10 # discover all protected URL paths after initialization 11 from django_magic_authorization.middleware import discover_protected_paths 12 13 discover_protected_paths()