Settings Reference

All settings are optional. Defaults are shown where applicable.

Core

PRAGMATIC_TRACK_DELETED_OBJECTS

Default: False

When True, DeleteObjectMixin records every deleted object in the DeletedObject table, storing the content type, object id, string representation, and the user who performed the deletion.

PRAGMATIC_TRACK_DELETED_OBJECTS = True

PRAGMATIC_TASK_DECORATOR

Default: 'django.tasks.task'

Import path of the task decorator used by get_task_decorator(). Set this to your background task backend of choice:

# Django 6.0+ built-in tasks
PRAGMATIC_TASK_DECORATOR = 'django.tasks.task'

# django-rq
PRAGMATIC_TASK_DECORATOR = 'django_rq.job'

# Celery
PRAGMATIC_TASK_DECORATOR = 'celery.shared_task'

DEFAULT_PERMISSIONS

Default: ('add', 'change', 'delete', 'view')

Overrides the default_permissions Meta option on the DeletedObject model.

Maintenance Mode

MAINTENANCE_MODE

Default: False

Set to True to activate MaintenanceModeMiddleware. All requests will receive a 503 response rendered from maintenance_mode.html.

MAINTENANCE_MODE_BYPASS_USERS

Default: []

A list of user primary keys that are exempt from maintenance mode.

MAINTENANCE_MODE_BYPASS_USERS = [1, 42]

Email / Background Queue

MAILS_QUEUE

Default: None

RQ queue name used by EmailManager.send_mail(). When set, emails are dispatched asynchronously via send_mail_in_background.delay(). When None, emails are sent synchronously.

MAILS_QUEUE = 'default'

PDF Generation

HTMLTOPDF_API_URL

URL of an HTML-to-PDF conversion API endpoint, used by PdfDetailMixin. The mixin POSTs rendered HTML to this URL and streams the PDF response back.

PRINTMYWEB_URL

Alternative HTML-to-PDF endpoint (takes precedence is superseded by HTMLTOPDF_API_URL if both are set — HTMLTOPDF_API_URL wins).

PRINTMYWEB_TOKEN

API key sent as an api-key request header when calling the PRINTMYWEB_URL endpoint.

Context Processors

DATE_FORMAT_JS

JavaScript date format string exposed by the date_formats context processor.

DATE_FORMAT_TAG

Django template date format tag string, exposed by date_formats.

DATE_FORMAT_FULLMONTH_TAG

Full-month date format tag, exposed by date_formats.

Signals / APM

APM_DEBUG

Default: False

When True, prints APM context messages to stdout (useful during development when elastic-apm is not installed).

TEST_PRINT_TASKS

Default: True

Controls whether SignalsHelper prints task debug output when settings.DEBUG is True.