approval.apps
1from django.apps.config import AppConfig 2from django.utils.translation import pgettext_lazy 3 4 5class ApprovalConfig(AppConfig): 6 """AppConfig for Approval application.""" 7 name = "approval" 8 label = "approval" 9 verbose_name = pgettext_lazy("approval", "approval") 10 default_auto_field = "django.db.models.BigAutoField" 11 12 def ready(self): 13 """Initialize application when Django is ready.""" 14 from django.conf import settings 15 from . import settings as default 16 # You can disable automatic approval handling by disabling signals. 17 if not getattr(settings, "APPROVAL_DISABLE_SIGNALS", default.APPROVAL_DISABLE_SIGNALS): 18 from . import listeners # noqa
class
ApprovalConfig(django.apps.config.AppConfig):
6class ApprovalConfig(AppConfig): 7 """AppConfig for Approval application.""" 8 name = "approval" 9 label = "approval" 10 verbose_name = pgettext_lazy("approval", "approval") 11 default_auto_field = "django.db.models.BigAutoField" 12 13 def ready(self): 14 """Initialize application when Django is ready.""" 15 from django.conf import settings 16 from . import settings as default 17 # You can disable automatic approval handling by disabling signals. 18 if not getattr(settings, "APPROVAL_DISABLE_SIGNALS", default.APPROVAL_DISABLE_SIGNALS): 19 from . import listeners # noqa
AppConfig for Approval application.
def
ready(self):
13 def ready(self): 14 """Initialize application when Django is ready.""" 15 from django.conf import settings 16 from . import settings as default 17 # You can disable automatic approval handling by disabling signals. 18 if not getattr(settings, "APPROVAL_DISABLE_SIGNALS", default.APPROVAL_DISABLE_SIGNALS): 19 from . import listeners # noqa
Initialize application when Django is ready.
Inherited Members
- django.apps.config.AppConfig
- AppConfig
- module
- apps
- models_module
- models
- create
- get_model
- get_models
- import_models