Skip to main content

Django-GC

Added in 1.0.1

What Django-GC is​

Django-GC stores typed runtime settings in the database and uses a shared cache when configured. 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, and initialize_global_configs.
  • Types — every SettingType and its stored format.
  • Admin — stock ModelAdmin, read-only keys, and forms.
  • History — Django Admin LogEntry history.
  • Cache — Django cache keys, readiness, and lock.
  • Settings and checks — settings, encryption key, optional Celery.
  • API reference — public functions, classes, and exceptions.

Requirements​

PythonMinimum Django
3.12, 3.13, 3.146.0
3.156.1.3

CI runs the full test suite with the locked Django version and the minimum for each Python version. See the upgrade and operations guide for the 1.1.6 upgrade and deployment sequence.

Celery is optional and only needed for a periodic refresh task:

pip install 'django-gc[celery]'