django_program.conference.admin¶
Django admin configuration for the conference app.
Classes
Admin interface for managing conferences. |
|
Custom form that masks Stripe secret fields in the admin. |
|
Standalone admin for per-conference feature flag overrides. |
|
Form for FeatureFlags that replaces 'Unknown' with 'Default (enabled)'. |
|
Inline editor for per-conference feature flag overrides. |
|
Char field that preserves the stored value when left unchanged. |
|
Password widget that shows a placeholder instead of the real value. |
|
Admin interface for managing conference sections. |
|
Inline editor for conference sections. |
- class django_program.conference.admin.SecretInput[source]¶
Bases:
PasswordInputPassword widget that shows a placeholder instead of the real value.
When a value already exists in the database the widget renders
SECRET_PLACEHOLDERas the visible value so admins know a key is set, but the actual secret never appears in the HTML source. Submitting the placeholder (or an empty string) signals “keep existing value”.- property media¶
- class django_program.conference.admin.SecretField[source]¶
Bases:
CharFieldChar field that preserves the stored value when left unchanged.
Works with
SecretInput: if the submitted value is empty or equals the placeholder, the field returns the original database value so secrets are never accidentally blanked.- Parameters:
kwargs (
object)
- widget¶
alias of
SecretInput
- class django_program.conference.admin.ConferenceForm[source]¶
Bases:
ModelFormCustom form that masks Stripe secret fields in the admin.
Uses
SecretField/SecretInputso decrypted values are never present in the rendered HTML. Admins see a dot placeholder when a value is set; leaving the field unchanged preserves the stored secret.- base_fields = {'address': <django.forms.fields.CharField object>, 'end_date': <django.forms.fields.DateField object>, 'is_active': <django.forms.fields.BooleanField object>, 'name': <django.forms.fields.CharField object>, 'pretalx_event_slug': <django.forms.fields.CharField object>, 'slug': <django.forms.fields.SlugField object>, 'start_date': <django.forms.fields.DateField object>, 'stripe_publishable_key': <django_program.conference.admin.SecretField object>, 'stripe_secret_key': <django_program.conference.admin.SecretField object>, 'stripe_webhook_secret': <django_program.conference.admin.SecretField object>, 'timezone': <django.forms.fields.CharField object>, 'total_capacity': <django.forms.fields.IntegerField object>, 'venue': <django.forms.fields.CharField object>, 'website_url': <django.forms.fields.URLField object>}¶
- declared_fields = {'stripe_publishable_key': <django_program.conference.admin.SecretField object>, 'stripe_secret_key': <django_program.conference.admin.SecretField object>, 'stripe_webhook_secret': <django_program.conference.admin.SecretField object>}¶
- property media¶
Return all media required to render the widgets on this form.
- class django_program.conference.admin.SectionInline[source]¶
Bases:
TabularInlineInline editor for conference sections.
Allows adding and editing sections directly from the conference admin change form.
- extra = 1¶
- prepopulated_fields = {'slug': ('name',)}¶
- fields = ('name', 'slug', 'start_date', 'end_date', 'order')¶
- property media¶
- class django_program.conference.admin.FeatureFlagsForm[source]¶
Bases:
ModelFormForm for FeatureFlags that replaces ‘Unknown’ with ‘Default (enabled)’.
Each nullable boolean field defaults to
Nonewhich means “use the value fromDJANGO_PROGRAM['features']in settings”. Since the out-of-the-box default for every feature isTrue, the widget label reads “Default (enabled)” instead of Django’s generic “Unknown”.- base_fields = {'all_ui_enabled': <django.forms.fields.NullBooleanField object>, 'conference': <django.forms.models.ModelChoiceField object>, 'manage_ui_enabled': <django.forms.fields.NullBooleanField object>, 'pretalx_sync_enabled': <django.forms.fields.NullBooleanField object>, 'programs_enabled': <django.forms.fields.NullBooleanField object>, 'public_ui_enabled': <django.forms.fields.NullBooleanField object>, 'registration_enabled': <django.forms.fields.NullBooleanField object>, 'sponsors_enabled': <django.forms.fields.NullBooleanField object>, 'travel_grants_enabled': <django.forms.fields.NullBooleanField object>}¶
- declared_fields = {}¶
- property media¶
Return all media required to render the widgets on this form.
- class django_program.conference.admin.FeatureFlagsInline[source]¶
Bases:
StackedInlineInline editor for per-conference feature flag overrides.
Allows toggling individual features directly from the conference admin change form. At most one
FeatureFlagsrow per conference.- model¶
alias of
FeatureFlags
- form¶
alias of
FeatureFlagsForm
- extra = 0¶
- max_num = 1¶
- fieldsets = (('Module Toggles', {'fields': ('registration_enabled', 'sponsors_enabled', 'travel_grants_enabled', 'programs_enabled', 'pretalx_sync_enabled')}), ('UI Toggles', {'fields': ('public_ui_enabled', 'manage_ui_enabled', 'all_ui_enabled')}))¶
- property media¶
- class django_program.conference.admin.ConferenceAdmin[source]¶
Bases:
ModelAdminAdmin interface for managing conferences.
Groups fields into logical fieldsets: basic information, dates, third-party integrations (Pretalx and Stripe), and status metadata. Sections and feature flags are editable inline.
- form¶
alias of
ConferenceForm
- list_display = ('name', 'slug', 'start_date', 'end_date', 'is_active')¶
- list_filter = ('is_active',)¶
- search_fields = ('name', 'slug')¶
- prepopulated_fields = {'slug': ('name',)}¶
- inlines = (<class 'django_program.conference.admin.SectionInline'>, <class 'django_program.conference.admin.FeatureFlagsInline'>)¶
- fieldsets = ((None, {'fields': ('name', 'slug', 'venue', 'address', 'website_url', 'total_capacity')}), ('Dates', {'fields': ('start_date', 'end_date', 'timezone')}), ('Integrations', {'classes': ('collapse',), 'fields': ('pretalx_event_slug', 'stripe_secret_key', 'stripe_publishable_key', 'stripe_webhook_secret')}), ('Status', {'fields': ('is_active',)}))¶
- property media¶
- class django_program.conference.admin.SectionAdmin[source]¶
Bases:
ModelAdminAdmin interface for managing conference sections.
Provides filtering by conference and search by name or slug. The slug field is auto-populated from the section name.
- list_display = ('name', 'conference', 'start_date', 'end_date', 'order')¶
- list_filter = ('conference',)¶
- search_fields = ('name', 'slug')¶
- prepopulated_fields = {'slug': ('name',)}¶
- property media¶
- class django_program.conference.admin.FeatureFlagsAdmin[source]¶
Bases:
ModelAdminStandalone admin for per-conference feature flag overrides.
Provides a list view for quick scanning across conferences. The same data is also editable inline on the Conference admin page.
- form¶
alias of
FeatureFlagsForm
- list_display = ('conference', 'registration_enabled', 'sponsors_enabled', 'travel_grants_enabled', 'programs_enabled', 'public_ui_enabled', 'updated_at')¶
- list_filter = ('conference',)¶
- fieldsets = (('Conference', {'fields': ('conference',)}), ('Module Toggles', {'fields': ('registration_enabled', 'sponsors_enabled', 'travel_grants_enabled', 'programs_enabled', 'pretalx_sync_enabled')}), ('UI Toggles', {'fields': ('public_ui_enabled', 'manage_ui_enabled', 'all_ui_enabled')}))¶
- property media¶