duck.backend.django.setupΒΆ
Django setup module.
Module ContentsΒΆ
FunctionsΒΆ
Sets up Django settings if they are not already configured. This is useful when running Django-specific tasks that require access to the settings module, such as database operations or management commands. |
APIΒΆ
- exception duck.backend.django.setup.DjangoSetupWarningΒΆ
Bases:
UserWarningWill be flagged if Django setup fails somehow.
Initialization
Initialize self. See help(type(self)) for accurate signature.
- duck.backend.django.setup.prepare_django(setup: bool = False)ΒΆ
Sets up Django settings if they are not already configured. This is useful when running Django-specific tasks that require access to the settings module, such as database operations or management commands.
- Parameters:
setup β Whether to setup Django if django apps not ready.