django_program.manage.views_financial

Financial overview dashboard views for conference management.

Provides revenue summaries, order/cart/payment breakdowns, ticket sales analytics, and recent transaction listings – all scoped to the current conference.

Classes

FinancePermissionMixin

Permission mixin for finance-scoped management views.

FinancialDashboardView

Comprehensive financial overview for a conference.

class django_program.manage.views_financial.FinancePermissionMixin[source]

Bases: LoginRequiredMixin

Permission mixin for finance-scoped management views.

Resolves the conference from the conference_slug URL kwarg and checks that the authenticated user satisfies at least one of:

  • is a superuser,

  • holds the program_conference.change_conference permission (Conference Organizers), or

  • belongs to the “Program: Finance & Accounting” group.

Stores the resolved conference on self.conference and injects it into the template context alongside active_nav.

Raises:

PermissionDenied – If the user fails all three checks.

conference: Conference
kwargs: dict[str, str]
dispatch(request, *args, **kwargs)[source]

Resolve the conference and enforce permissions before dispatch.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • *args (str) – Positional arguments from the URL resolver.

  • **kwargs (str) – Keyword arguments from the URL pattern.

Return type:

HttpResponse

Returns:

The HTTP response from the downstream view.

Raises:

PermissionDenied – If the user is not authorized.

get_context_data(**kwargs)[source]

Add the conference to the template context.

Parameters:

**kwargs (object) – Additional context data.

Return type:

dict[str, object]

Returns:

Template context with conference included.

class django_program.manage.views_financial.FinancialDashboardView[source]

Bases: FinancePermissionMixin, TemplateView

Comprehensive financial overview for a conference.

Computes revenue totals, order/cart/payment breakdowns, ticket sales analytics, and surfaces recent orders and active carts. All data is scoped to self.conference (resolved by FinancePermissionMixin).

template_name = 'django_program/manage/financial_dashboard.html'
get_context_data(**kwargs)[source]

Build context with all financial metrics for the dashboard.

Parameters:

**kwargs (object) – Additional context data.

Return type:

dict[str, object]

Returns:

Template context containing revenue, order, cart, payment, ticket, and credit analytics.