Django system checks
- synopsis:
Django system checks provided by django-boost
django-boost registers its checks automatically when django_boost is in
INSTALLED_APPS.
Run all Django checks with:
python manage.py check
Run only django-boost checks with:
python manage.py check --tag django_boost
Check IDs
django_boost.W001django_boost.db.router.DatabaseRouteris configured, butDATABASE_APPS_MAPPINGis missing. SetDATABASE_APPS_MAPPINGto a dict mapping app labels to database aliases.django_boost.E001DATABASE_APPS_MAPPINGis not a dict. Set it to a dict such as{"myapp": "secondary"}.django_boost.E002DATABASE_APPS_MAPPINGreferences a database alias that is not present inDATABASES. Add the alias toDATABASESor update the mapping.django_boost.W002DATABASE_APPS_MAPPINGcontains an app label that is not installed. Use the app label from the app’sAppConfig.django_boost.W010RedirectCorrectHostnameMiddlewareis enabled withDEBUG = False, butCORRECT_HOSTis missing or empty. SetCORRECT_HOSTto the canonical host name or remove the middleware.django_boost.W011CORRECT_HOSTappears to contain a scheme, path, or whitespace. Set it to a host name such as"example.com"or"www.example.com".django_boost.W012CORRECT_HOSTis not allowed byALLOWED_HOSTSwhenDEBUG = False. Add the canonical host toALLOWED_HOSTS. A wildcard"*"is accepted. IfCORRECT_HOSTincludes a port, django-boost compares the host name portion againstALLOWED_HOSTSlike Django does for incoming requests.django_boost.E020django_boost.context_processors.user_agentis configured, but the optionaluser-agentsdependency is not installed. Install it withpip install django-boost[useragent].This check detects the context processor configuration. It does not attempt to statically detect arbitrary
UserAgentMixinusage in view code.django_boost.W030A model using
LogicalDeletionMixinis missing thedeleted_atfield. Keep the inherited field or provide a nullable replacement.django_boost.W031A model using
LogicalDeletionMixinhas a default manager withoutalive(),dead(), orrevive(). Keep the inheritedLogicalDeletionManageror provide a compatible manager.django_boost.W032A model using
LogicalDeletionMixinhas a non-nullabledeleted_atfield. Keep the inherited field or provide a replacement that allowsNULL.