A Magento-style system configuration app for Django
Project description
django-sysconfig
Runtime configuration for Django. Define typed config fields in code, store values in the database, edit everything through a built-in admin UI — without touching settings.py.
Why django-sysconfig?
Some settings belong in settings.py. Others — feature flags, rate limits, API keys, email addresses — need to change at runtime without a redeploy, often by someone who isn't an engineer.
django-sysconfig gives those settings a proper home: a typed schema in code, values in the database, and a clean staff UI to manage them.
Install
pip install django-sysconfig
# settings.py
INSTALLED_APPS = [
"django_sysconfig", # add at the top
...
]
python manage.py migrate
Quick example
# myapp/sysconfig.py
from django_sysconfig.registry import register_config, Section, Field
from django_sysconfig.frontend_models import BooleanFrontendModel, IntegerFrontendModel
from django_sysconfig.validators import RangeValidator
@register_config("myapp")
class MyAppConfig:
class General(Section):
label = "General"
maintenance_mode = Field(BooleanFrontendModel, label="Maintenance Mode", default=False)
max_items = Field(IntegerFrontendModel, label="Max Items", default=100,
validators=[RangeValidator(min_value=1, max_value=10_000)])
# anywhere in your project
from django_sysconfig.accessor import config
if config.get("myapp.general.maintenance_mode"):
return HttpResponse("Down for maintenance.", status=503)
Staff can change maintenance_mode through /admin/config/ — no code change, no redeploy.
What's included
- 7 field types — string, integer, decimal, boolean, select, textarea, encrypted secret
- 20 built-in validators — email, URL, IP, hostname, port, range, regex, slug, JSON, and more
- Auto-discovery — drop a
sysconfig.pyin any installed app, it's picked up on startup - Typed accessor —
config.get(...)always returns the correct Python type - Caching — values are cached via Django's cache framework, invalidated on every write
- Encryption at rest — secret fields use Fernet symmetric encryption
- on_save callbacks — react to value changes with custom logic
- Management commands —
config get,config set,config import,config export
Requirements
| Minimum | |
|---|---|
| Python | 3.11 |
| Django | 4.2 |
cryptography |
41.0 |
Documentation
krishnamodepalli.github.io/django-sysconfig
Contributing
See CONTRIBUTING.md. Issues and pull requests are welcome.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_sysconfig-1.0.0.tar.gz.
File metadata
- Download URL: django_sysconfig-1.0.0.tar.gz
- Upload date:
- Size: 47.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cda832653ece8f85c3137710619ede15048e4908c7d9d0717dd5051ee96c236f
|
|
| MD5 |
dd1d770237ff38b6cb4ae8773fb91093
|
|
| BLAKE2b-256 |
25a6b0cfb151ed68c229a5745461e4c63545007f218375768fbbcc3d551f7df7
|
Provenance
The following attestation bundles were made for django_sysconfig-1.0.0.tar.gz:
Publisher:
release.yml on krishnamodepalli/django-sysconfig
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_sysconfig-1.0.0.tar.gz -
Subject digest:
cda832653ece8f85c3137710619ede15048e4908c7d9d0717dd5051ee96c236f - Sigstore transparency entry: 1181884200
- Sigstore integration time:
-
Permalink:
krishnamodepalli/django-sysconfig@42146f44ec65c8772695dcf1d4fcc92b99a1623c -
Branch / Tag:
refs/heads/master - Owner: https://github.com/krishnamodepalli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@42146f44ec65c8772695dcf1d4fcc92b99a1623c -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_sysconfig-1.0.0-py3-none-any.whl.
File metadata
- Download URL: django_sysconfig-1.0.0-py3-none-any.whl
- Upload date:
- Size: 42.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b7515fbf9789420011a686003e6b4d56626f2f0ecc48e4e733dbd6aa4d5cd2e
|
|
| MD5 |
46e4fa27467ed438b15c1b496d99a829
|
|
| BLAKE2b-256 |
ea627e57919dfce7d4b8f3a42225fb504e77fc19efa07229a3b33af44446debe
|
Provenance
The following attestation bundles were made for django_sysconfig-1.0.0-py3-none-any.whl:
Publisher:
release.yml on krishnamodepalli/django-sysconfig
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_sysconfig-1.0.0-py3-none-any.whl -
Subject digest:
1b7515fbf9789420011a686003e6b4d56626f2f0ecc48e4e733dbd6aa4d5cd2e - Sigstore transparency entry: 1181884215
- Sigstore integration time:
-
Permalink:
krishnamodepalli/django-sysconfig@42146f44ec65c8772695dcf1d4fcc92b99a1623c -
Branch / Tag:
refs/heads/master - Owner: https://github.com/krishnamodepalli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@42146f44ec65c8772695dcf1d4fcc92b99a1623c -
Trigger Event:
push
-
Statement type: