Django-GC
What Django-GC is
Django-GC stores typed runtime settings in the database and serves them from Django's cache. Application code never reads a value through the ORM. The project owns the keys; this package is the mechanism.
It is not a replacement for django.conf.settings. Static deploy-time settings stay in Django settings. This package is for values operators change at runtime: feature flags, limits, secrets that rotate, and similar knobs.
Feature overview
- Getting started — install,
INSTALLED_APPS, first definitions. - How it works — snapshot, lock, parse, and the read path.
- Definitions —
CategoryDefinition,SettingDefinition, andpost_migrate. - Types — every
SettingTypeand its stored format. - Admin — stock
ModelAdmin, read-only keys, and forms. - History — Django Admin
LogEntryhistory. - Cache — Django cache keys, readiness, and lock.
- Settings and checks — settings, encryption key, optional Celery.
- API reference — public functions, classes, and exceptions.
Requirements
- Python 3.12+
- Django 6.0+
Celery is optional and only needed for a periodic refresh task:
pip install 'django-gc[celery]'