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:
- 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:
- 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
- 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.
- 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
- class AKSubmission.views.AKHistoryView(**kwargs)[source]
Bases:
EventSlugMixin
,DetailView
View: Show history of a given 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
- class AKSubmission.views.AKAndAKWishSubmissionView(**kwargs)[source]
Bases:
EventSlugMixin
,EventInactiveRedirectMixin
,CreateView
View: Submission form for AKs and Wishes
Base view, will be used by
AKSubmissionView
andAKWishSubmissionView
- 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
- class AKSubmission.views.AKOwnerCreateView(**kwargs)[source]
Bases:
EventSlugMixin
,EventInactiveRedirectMixin
,CreateView
View: Create a new owner
- 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
andAKOwnerEditDispatchView
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
- 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
)- 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- 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
- 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