django_program.registration.admin¶
Django admin configuration for the registration app.
Classes
Admin interface for managing add-ons. |
|
Admin interface for viewing shopping carts. |
|
Inline display of cart items within the cart admin. |
|
Admin interface for managing store credits. |
|
Read-only admin for webhook processing errors. |
|
Admin interface for managing orders. |
|
Inline display of order line items within the order admin. |
|
Inline display of payments within the order admin. |
|
Read-only admin for Stripe customer mappings. |
|
Read-only admin for Stripe webhook events. |
|
Admin interface for managing ticket types. |
|
Admin interface for managing vouchers. |
- class django_program.registration.admin.TicketTypeAdmin[source]¶
Bases:
ModelAdminAdmin interface for managing ticket types.
Provides filtering by conference and active status, search by name and slug, and auto-population of the slug from the ticket name.
- list_display = ('name', 'conference', 'price', 'is_active', 'order')¶
- list_filter = ('conference', 'is_active')¶
- search_fields = ('name', 'slug')¶
- prepopulated_fields = {'slug': ('name',)}¶
- property media¶
- class django_program.registration.admin.AddOnAdmin[source]¶
Bases:
ModelAdminAdmin interface for managing add-ons.
Uses
filter_horizontalfor therequires_ticket_typesmany-to-many field to provide a friendlier selection widget.- list_display = ('name', 'conference', 'price', 'is_active')¶
- list_filter = ('conference', 'is_active')¶
- search_fields = ('name', 'slug')¶
- prepopulated_fields = {'slug': ('name',)}¶
- filter_horizontal = ('requires_ticket_types',)¶
- property media¶
- class django_program.registration.admin.VoucherAdmin[source]¶
Bases:
ModelAdminAdmin interface for managing vouchers.
Displays usage counts alongside the voucher configuration and allows filtering by conference, type, and active status.
- list_display = ('code', 'conference', 'voucher_type', 'discount_value', 'times_used', 'max_uses', 'is_active')¶
- list_filter = ('conference', 'voucher_type', 'is_active')¶
- search_fields = ('code',)¶
- filter_horizontal = ('applicable_ticket_types', 'applicable_addons')¶
- property media¶
- class django_program.registration.admin.CartItemInline[source]¶
Bases:
TabularInlineInline display of cart items within the cart admin.
Items are shown as read-only since they are managed through the storefront, not directly in the admin.
- extra = 0¶
- readonly_fields = ('ticket_type', 'addon', 'quantity')¶
- property media¶
- class django_program.registration.admin.CartAdmin[source]¶
Bases:
ModelAdminAdmin interface for viewing shopping carts.
Carts are primarily managed by the storefront; the admin provides a read-oriented view with inline cart items.
- list_display = ('user', 'conference', 'status', 'voucher', 'expires_at')¶
- list_filter = ('conference', 'status')¶
- inlines = (<class 'django_program.registration.admin.CartItemInline'>,)¶
- property media¶
- class django_program.registration.admin.OrderLineItemInline[source]¶
Bases:
TabularInlineInline display of order line items within the order admin.
Line items are immutable snapshots from checkout and are shown read-only.
- model¶
alias of
OrderLineItem
- extra = 0¶
- readonly_fields = ('description', 'quantity', 'unit_price', 'discount_amount', 'line_total', 'ticket_type', 'addon')¶
- property media¶
- class django_program.registration.admin.PaymentInline[source]¶
Bases:
TabularInlineInline display of payments within the order admin.
- extra = 0¶
- property media¶
- class django_program.registration.admin.OrderAdmin[source]¶
Bases:
ModelAdminAdmin interface for managing orders.
Displays order reference, user, status, and financial totals. Money fields are read-only to prevent accidental edits; changes should flow through the payment and refund workflows instead.
- list_display = ('reference', 'user', 'conference', 'status', 'total', 'created_at')¶
- list_filter = ('conference', 'status')¶
- search_fields = ('reference', 'user__email', 'billing_email')¶
- readonly_fields = ('subtotal', 'discount_amount', 'total')¶
- inlines = (<class 'django_program.registration.admin.OrderLineItemInline'>, <class 'django_program.registration.admin.PaymentInline'>)¶
- property media¶
- class django_program.registration.admin.CreditAdmin[source]¶
Bases:
ModelAdminAdmin interface for managing store credits.
Provides filtering by conference and credit status, and displays the amount and creation date at a glance.
- list_display = ('user', 'conference', 'amount', 'status', 'created_at')¶
- list_filter = ('conference', 'status')¶
- property media¶
- class django_program.registration.admin.StripeCustomerAdmin[source]¶
Bases:
ModelAdminRead-only admin for Stripe customer mappings.
- list_display = ('user', 'conference', 'stripe_customer_id', 'created_at')¶
- list_filter = ('conference',)¶
- search_fields = ('user__email', 'stripe_customer_id')¶
- readonly_fields = ('user', 'conference', 'stripe_customer_id', 'created_at')¶
- has_add_permission(request)[source]¶
Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.
- Parameters:
request (
HttpRequest)- Return type:
- has_change_permission(request, obj=None)[source]¶
Return True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to change the obj model instance. If obj is None, this should return True if the given request has permission to change any object of the given type.
- Parameters:
request (
HttpRequest)obj (
StripeCustomer|None)
- Return type:
- has_delete_permission(request, obj=None)[source]¶
Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
- Parameters:
request (
HttpRequest)obj (
StripeCustomer|None)
- Return type:
- property media¶
- class django_program.registration.admin.StripeEventAdmin[source]¶
Bases:
ModelAdminRead-only admin for Stripe webhook events.
- list_display = ('stripe_id', 'kind', 'processed', 'livemode', 'created_at')¶
- list_filter = ('kind', 'processed', 'livemode')¶
- search_fields = ('stripe_id', 'customer_id')¶
- readonly_fields = ('stripe_id', 'kind', 'livemode', 'payload', 'customer_id', 'processed', 'api_version', 'created_at')¶
- has_add_permission(request)[source]¶
Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.
- Parameters:
request (
HttpRequest)- Return type:
- has_change_permission(request, obj=None)[source]¶
Return True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to change the obj model instance. If obj is None, this should return True if the given request has permission to change any object of the given type.
- Parameters:
request (
HttpRequest)obj (
StripeEvent|None)
- Return type:
- has_delete_permission(request, obj=None)[source]¶
Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
- Parameters:
request (
HttpRequest)obj (
StripeEvent|None)
- Return type:
- property media¶
- class django_program.registration.admin.EventProcessingExceptionAdmin[source]¶
Bases:
ModelAdminRead-only admin for webhook processing errors.
- list_display = ('message', 'event', 'created_at')¶
- list_filter = ('created_at',)¶
- search_fields = ('message',)¶
- readonly_fields = ('event', 'data', 'message', 'traceback', 'created_at')¶
- has_add_permission(request)[source]¶
Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.
- Parameters:
request (
HttpRequest)- Return type:
- has_change_permission(request, obj=None)[source]¶
Return True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to change the obj model instance. If obj is None, this should return True if the given request has permission to change any object of the given type.
- Parameters:
request (
HttpRequest)obj (
EventProcessingException|None)
- Return type:
- has_delete_permission(request, obj=None)[source]¶
Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
- Parameters:
request (
HttpRequest)obj (
EventProcessingException|None)
- Return type:
- property media¶