django_program.context_processors¶
Django context processors for django-program.
Functions
|
Expose resolved feature toggle flags to templates. |
- django_program.context_processors.program_features(request)[source]¶
Expose resolved feature toggle flags to templates.
Each flag is resolved through
is_feature_enabled()so that master-switch overrides (e.g.all_ui_enabled) are applied. When the request carries aconferenceattribute (set by middleware or the view), per-conference DB overrides are included in the resolution.Add
"django_program.context_processors.program_features"to thecontext_processorslist in yourTEMPLATESsetting.Usage in templates:
{% if program_features.registration_enabled %} <a href="{% url 'registration:ticket-list' %}">Registration</a> {% endif %}