Settings
The django-logikal
library provides a set of opinionated standard settings modules for local
development, testing and production use.
You can simply import the appropriate settings module in your own settings files to benefit from a highly improved Django experience:
from django_logikal.settings.dynamic_site import *
Common Features
All settings modules include the following:
An appropriate logging, storage, localization and static file serving configuration
PostgreSQL as the default database engine (including for local development and testing)
HTML validation support (via v.Nu)
Authentication support (via
django.contrib.auth
)Sitemap support (via
django.contrib.sitemaps
)Robots exclusion support (via django-robots)
Local Development
- django_logikal.settings.dynamic_site
Standard local settings for dynamic sites.
Note
Requires the dynamic extra.
Includes the following:
Email sending support (via Anymail and Amazon Simple Email Service)
- django_logikal.settings.static_site
Standard local settings for static sites.
Note
Requires the static extra.
Includes the following:
Static site generation support (via django-distill)
Testing
- django_logikal.settings.testing
Standard settings for testing dynamic or static sites.
Note
You must import the appropriate local settings file before importing this module:
from project.settings.local import * from django_logikal.settings.testing import *
Production
- django_logikal.settings.production
Standard production settings for dynamic sites.
Note
Secrets will be loaded from Google Secret Manager during import time. In particular, the secret key is loaded from
django-secret-key
, and the database configuration is loaded fromdjango-database-secrets
(which must be a JSON string with keyshostname
,port
,database
,username
andpassword
).