skillfed

django-settings-export

This Django app allows you to export certain settings to your templates.

django-settings-export v1.2.1 81.1K downloads/30d#14,251 on PyPI189
Permissive license BSD Abandoned released

What it is and what it does

django-settings-export is a Django template context processor that makes selected project settings available inside templates. It works by registering a context processor that injects a dict-like object containing only the settings you explicitly list in SETTINGS_EXPORT, preventing accidental exposure of sensitive configuration. The package enforces two principles: only explicitly listed settings are exported (no implicit access), and accessing undefined or unexported settings raises an exception rather than silently failing.

The typical workflow is to add the context processor to your Django template configuration, list the settings you want to expose in SETTINGS_EXPORT, then reference them in templates via the settings variable (or a custom name if you configure SETTINGS_EXPORT_VARIABLE_NAME). The settings object behaves like a dict, so you can iterate over keys, values, or items in templates.

Use it for:

  • Expose feature flags like DEBUG to templates for conditional rendering without passing them explicitly to every view
  • Make analytics IDs (GA_ID, etc.) available to templates for tracking code without hardcoding or view-level context
  • Provide environment-specific configuration (API endpoints, feature toggles) to frontend templates
  • Allow templates to access version strings or build metadata stored in Django settings

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Django template context processor that selectively exports project settings to templates, with explicit opt-in and strict error handling for undefined or unexported keys.

No. The package is abandoned (last release November 2016, no maintenance since August 2023) and its compatibility with modern Django (2.0+) and Python (3.8+) is unverified. High install friction combined with no active maintenance makes this a significant risk for new projects. Consider using a modern alternative or implementing the same pattern directly in your context processors.

Install

django-settings-export on PyPI

pip

pip install django-settings-export

uv

uv add django-settings-export

poetry

poetry add django-settings-export

Installing django-settings-export

Before you install

High install friction and abandoned maintenance status (last release November 2016, no commits since August 2023). Compatibility with modern Django and Python versions is unverified.

License in practice

BSD permissive license allows commercial and private use with minimal restrictions.

Quickstart

pip install django-settings-export

# In settings.py:
SETTINGS_EXPORT = ['DEBUG', 'GA_ID']

# Add to TEMPLATES context_processors:
'django_settings_export.settings_export'

# In template:
{{ settings.DEBUG }}
{{ settings.GA_ID }}

Requires Django 1.5+ and manual context processor registration in settings.py; compatibility with Django 2.0+ and Python 3.8+ is not documented.

Verify before relying

  • Whether this package works with Django versions released after 2016 (2.0, 3.0, 4.0, 5.0)
  • Whether this package works with Python 3.8+ given the last release was in 2016
  • Whether there are known incompatibilities or breaking changes in modern Django/Python

Package facts

License BSD (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 3,568 days since the last release
Last repo commit
First released
Downloads 81,088/month — #14,251 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django-settings-export-1.2.1.tar.gz

Intended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3

Tags

django settings in templatesdjango template context processorexport django settingsdjango template variablesdjango config to templates
djangotemplate-contextabandoned

More Application Frameworks packages