Django App Parameter

Django App Parameter is a Django application that enables storing and managing application configuration parameters in the database. It allows non-developers to modify application settings at runtime through the Django admin interface without requiring code deployment or server restarts.

Python Version Django Version PyPI Version

Key Features

  • Database-backed configuration: Store parameters in your database instead of hardcoded settings

  • Runtime modification: Change configuration without redeploying or restarting your application

  • Django Admin integration: Full CRUD operations through the familiar Django admin interface

  • Type safety: Support for 16 data types with automatic type conversion

  • Validation: Built-in Django validators to ensure data integrity

  • Encryption: Optional encryption for sensitive values (requires cryptography package)

  • History tracking: Track parameter value changes over time (v2.1.0+)

  • Bulk operations: Import/export parameters via management commands

  • Template integration: Access global parameters directly in Django templates

Quick Start

Installation

pip install django-app-parameter

Configuration

Add to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    'django_app_parameter',
]

Run migrations:

python manage.py migrate

Usage Example

from django_app_parameter import app_parameter

# Get a parameter value (recommended way)
max_items = app_parameter.MAX_ITEMS_PER_PAGE  # Returns typed value

# Alternative: Use the model directly
from django_app_parameter.models import Parameter

param = Parameter.objects.get(slug="MAX_ITEMS_PER_PAGE")
max_items = param.get()  # Returns typed value (int, str, etc.)

Documentation

Development

Indices and tables