AKSubmission.views module

class AKSubmission.views.SubmissionErrorNotConfiguredView(**kwargs)[source]

Bases: EventSlugMixin, TemplateView

View to show when submission is not correctly configured yet for this event and hence the submission component cannot be used already.

class AKSubmission.views.AKOverviewView(**kwargs)[source]

Bases: FilterByEventSlugMixin, ListView

View: Show a tabbed list of AKs belonging to this event split by categories

Wishes show up in between of the other AKs in the category they belong to. In contrast to SubmissionOverviewView that inherits from this view, on this view there is no form to add new AKs or edit owners.

Since the inherited version of this view will have a slightly different behaviour, this view contains multiple methods that can be overriden for this adaption.

model

alias of AKCategory

filter_aks(context, category)[source]

Filter which AKs to display based on the given context and category

In the default case, all AKs of that category are returned (including wishes)

Parameters:
  • context – context of the view

  • category – category to filter the AK list for

Returns:

filtered list of AKs for the given category

Return type:

QuerySet[AK]

get_active_category_name(context)[source]

Get the category name to display by default/before further user interaction

In the default case, simply the first category (the one with the lowest ID for this event) is used

Parameters:

context – context of the view

Returns:

name of the default category

Return type:

str

get_table_title(context)[source]

Specify the title above the AK list/table in this view

Parameters:

context – context of the view

Returns:

title to use

Return type:

str

get(request, *args, **kwargs)[source]

Handle GET request

Overriden to allow checking for correct configuration and redirect to error page if necessary (see SubmissionErrorNotConfiguredView)

class AKSubmission.views.SubmissionOverviewView(**kwargs)[source]

Bases: AKOverviewView

View: List of AKs and possibility to add AKs or adapt owner information

Main/start view of the component.

This view inherits from AKOverviewView, but treats wishes as separate category if requested in the settings and handles the change actions mentioned above.

model

alias of AKCategory

get_table_title(context)[source]

Specify the title above the AK list/table in this view

Parameters:

context – context of the view

Returns:

title to use

Return type:

str

class AKSubmission.views.AKListByCategoryView(**kwargs)[source]

Bases: AKOverviewView

View: List of only the AKs belonging to a certain category.

This view inherits from AKOverviewView, but produces only one list instead of a tabbed one.

get_active_category_name(context)[source]

Get the category name to display by default/before further user interaction

In this case, this will be the name of the category specified via pk

Parameters:

context – context of the view

Returns:

name of the category

Return type:

str

class AKSubmission.views.AKListByTrackView(**kwargs)[source]

Bases: AKOverviewView

View: List of only the AKs belonging to a certain track.

This view inherits from AKOverviewView and there will be one list per category – but only AKs of a certain given track will be included in them.

filter_aks(context, category)[source]

Filter which AKs to display based on the given context and category

In this case, the list is further restricted by the track

Parameters:
  • context – context of the view

  • category – category to filter the AK list for

Returns:

filtered list of AKs for the given category

Return type:

QuerySet[AK]

class AKSubmission.views.AKDetailView(**kwargs)[source]

Bases: EventSlugMixin, DetailView

View: AK Details

model

alias of AK

class AKSubmission.views.AKHistoryView(**kwargs)[source]

Bases: EventSlugMixin, DetailView

View: Show history of a given AK

model

alias of AK

class AKSubmission.views.EventInactiveRedirectMixin[source]

Bases: object

Mixin that will cause a redirect when actions are performed on an inactive event. Will add a message explaining why the action was not performed to the user and then redirect to start page of the submission component

get_error_message()[source]

Error message to display after redirect (can be adjusted by this method)

Returns:

error message

Return type:

str

get(request, *args, **kwargs)[source]

Override GET request handling Will either perform the redirect including the message creation or continue with the planned dispatching

class AKSubmission.views.AKAndAKWishSubmissionView(**kwargs)[source]

Bases: EventSlugMixin, EventInactiveRedirectMixin, CreateView

View: Submission form for AKs and Wishes

Base view, will be used by AKSubmissionView and AKWishSubmissionView

model

alias of AK

form_class

alias of AKSubmissionForm

class AKSubmission.views.AKSubmissionView(**kwargs)[source]

Bases: AKAndAKWishSubmissionView

View: AK submission form

Extends AKAndAKWishSubmissionView

class AKSubmission.views.AKWishSubmissionView(**kwargs)[source]

Bases: AKAndAKWishSubmissionView

View: Wish submission form

Extends AKAndAKWishSubmissionView

form_class

alias of AKWishForm

class AKSubmission.views.AKEditView(**kwargs)[source]

Bases: EventSlugMixin, EventInactiveRedirectMixin, UpdateView

View: Update an AK

This allows to change most fields of an AK as specified in AKSubmission.forms.AKForm, including the availabilities. It will also handle the change from AK to wish and vice versa (triggered by adding or removing owners) and automatically create or delete (unscheduled) slots

model

alias of AK

form_class

alias of AKForm

class AKSubmission.views.AKOwnerCreateView(**kwargs)[source]

Bases: EventSlugMixin, EventInactiveRedirectMixin, CreateView

View: Create a new owner

model

alias of AKOwner

form_class

alias of AKOwnerForm

class AKSubmission.views.AKOwnerDispatchView(**kwargs)[source]

Bases: ABC, EventSlugMixin, View

Base view: Dispatch to correct view based upon

Will be used by AKOwnerSelectDispatchView and AKOwnerEditDispatchView to handle button clicks for “New AK” and “Edit Person Info” in submission overview based upon the selection in the owner dropdown field

abstract get_new_owner_redirect(event_slug)[source]

Get redirect when user selected “I do not own AKs yet”

Parameters:

event_slug – slug of the event, needed for constructing redirect

Returns:

redirect to perform

Return type:

HttpResponseRedirect

abstract get_valid_owner_redirect(event_slug, owner)[source]

Get redirect when user selected “I do not own AKs yet”

Parameters:
  • event_slug – slug of the event, needed for constructing redirect

  • owner – owner to perform the dispatching for

Returns:

redirect to perform

Return type:

HttpResponseRedirect

class AKSubmission.views.AKOwnerSelectDispatchView(**kwargs)[source]

Bases: AKOwnerDispatchView

View: Handle submission from the owner selection dropdown in submission overview for AK creation (“New AK” button)

This view will perform redirects depending on the selection in the owner dropdown field. Based upon the abstract base view AKOwnerDispatchView.

class AKSubmission.views.AKOwnerEditDispatchView(**kwargs)[source]

Bases: AKOwnerDispatchView

View: Handle submission from the owner selection dropdown in submission overview for owner editing (“Edit Person Info” button)

This view will perform redirects depending on the selection in the owner dropdown field. Based upon the abstract base view AKOwnerDispatchView.

class AKSubmission.views.AKOwnerEditView(**kwargs)[source]

Bases: FilterByEventSlugMixin, EventSlugMixin, EventInactiveRedirectMixin, UpdateView

View: Edit an owner

model

alias of AKOwner

form_class

alias of AKOwnerForm

class AKSubmission.views.AKSlotAddView(**kwargs)[source]

Bases: EventSlugMixin, EventInactiveRedirectMixin, CreateView

View: Add an additional slot to an AK The user has to select the duration of the slot in this view

The view will only process the request when the event is active (as steered by EventInactiveRedirectMixin)

model

alias of AKSlot

form_class

alias of AKDurationForm

class AKSubmission.views.AKSlotEditView(**kwargs)[source]

Bases: EventSlugMixin, EventInactiveRedirectMixin, UpdateView

View: Update the duration of an AK slot

The view will only process the request when the event is active (as steered by EventInactiveRedirectMixin) and only slots that are not scheduled yet may be changed

model

alias of AKSlot

form_class

alias of AKDurationForm

class AKSubmission.views.AKSlotDeleteView(*args, **kwargs)[source]

Bases: EventSlugMixin, EventInactiveRedirectMixin, DeleteView

View: Delete an AK slot

The view will only process the request when the event is active (as steered by EventInactiveRedirectMixin) and only slots that are not scheduled yet may be deleted

model

alias of AKSlot

class AKSubmission.views.EventAKMessagesWidget[source]

Bases: TemplateStatusWidget

Status page widget: AK Messages

A widget to display information about AK-related messages sent to organizers for the given event

class AKSubmission.views.AKAddOrgaMessageView(**kwargs)[source]

Bases: EventSlugMixin, CreateView

View: Form to create a (confidential) message to the organizers as defined in AKSubmission.forms.AKOrgaMessageForm

model

alias of AKOrgaMessage

form_class

alias of AKOrgaMessageForm