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.
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 15+ 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 manager with type-safe methods
from django_app_parameter.models import Parameter
max_items = Parameter.objects.int("MAX_ITEMS_PER_PAGE", default=10)
site_name = Parameter.objects.str("SITE_NAME", default="My Site")
is_enabled = Parameter.objects.bool("FEATURE_ENABLED", default=False)
Documentation
User Guide
API Reference
Development