AKModel.admin module
- class AKModel.admin.EventRelatedFieldListFilter(field, request, params, model, model_admin, field_path)[source]
Bases:
RelatedFieldListFilter
Reusable filter to restrict the possible choices of a field to those belonging to a certain event as specified in the event__id__exact GET parameter. The choices are only restricted if this parameter is present, otherwise all choices are used/returned
- class AKModel.admin.EventAdmin(model, admin_site)[source]
Bases:
ModelAdmin
Admin interface for Event
This allows to edit most fields of an event, some can only be changed by admin actions, since they have side effects
This admin interface registers additional views as defined in urls.py, the wizard, and the full scheduling functionality if the AKScheduling app is active.
The interface overrides the built-in creation interface for a new event and replaces it with the event creation wizard.
- get_urls()[source]
Get all event-related URLs This will be both the built-in URLs and additional views providing additional functionality :return: list of all relevant URLs :rtype: List[path]
- status_url(obj)[source]
Define a read-only field to go to the status page of the event
- Parameters:
obj – the event to link
- Returns:
status page link (HTML)
- Return type:
- toggle_plan_visibility(obj)[source]
Define a read-only field to toggle the visibility of the plan of this event This will choose from two different link targets/views depending on the current visibility status
- Parameters:
obj – event to change the visibility of the plan for
- Returns:
toggling link (HTML)
- Return type:
- class AKModel.admin.PrepopulateWithNextActiveEventMixin[source]
Bases:
object
Mixin for automated pre-population of the event field
- formfield_for_foreignkey(db_field, request, **kwargs)[source]
Override field generation for foreign key fields to introduce special handling for event fields: Pre-populate the event field with the next active event (since that is the most likeliest event to be worked on in the admin interface) to make creation of new owners easier
- class AKModel.admin.AKOwnerAdmin(model, admin_site)[source]
Bases:
PrepopulateWithNextActiveEventMixin
,ModelAdmin
Admin interface for AKOwner
- class AKModel.admin.AKCategoryAdmin(model, admin_site)[source]
Bases:
PrepopulateWithNextActiveEventMixin
,ModelAdmin
Admin interface for AKCategory
- model
alias of
AKCategory
- class AKModel.admin.AKTrackAdmin(model, admin_site)[source]
Bases:
PrepopulateWithNextActiveEventMixin
,ModelAdmin
Admin interface for AKTrack
- class AKModel.admin.AKRequirementAdmin(model, admin_site)[source]
Bases:
PrepopulateWithNextActiveEventMixin
,ModelAdmin
Admin interface for AKRequirements
- model
alias of
AKRequirement
- class AKModel.admin.WishFilter(request, params, model, model_admin)[source]
Bases:
SimpleListFilter
Re-usable filter for wishes
- class AKModel.admin.AKAdminForm(*args, **kwargs)[source]
Bases:
ModelForm
Modified admin form for AKs, to be used in
AKAdmin
Form fields:
- class AKModel.admin.AKAdmin(model, admin_site)[source]
Bases:
PrepopulateWithNextActiveEventMixin
,SimpleHistoryAdmin
Admin interface for AKs
Uses a modified form (see
AKAdminForm
)- form
alias of
AKAdminForm
- wiki_export(request, queryset)[source]
Action: Export to wiki syntax This will use the wiki export view (therefore, all AKs have to have the same event to correclty handle the categories and to prevent accidentially merging AKs from different events in the wiki) but restrict the AKs to the ones explicitly selected here.
- get_urls()[source]
Add additional URLs/views Currently used to reset the interest field and interest counter field
- class AKModel.admin.RoomAdmin(model, admin_site)[source]
Bases:
PrepopulateWithNextActiveEventMixin
,ModelAdmin
Admin interface for Rooms
- class AKModel.admin.EventTimezoneFormMixin[source]
Bases:
object
Mixin to enforce the usage of the timezone of the associated event in forms
- class AKModel.admin.AKSlotAdminForm(*args, **kwargs)[source]
Bases:
ModelForm
Modified admin form for AKSlots, to be used in
AKSlotAdmin
Form fields:
- class AKModel.admin.AKSlotAdmin(model, admin_site)[source]
Bases:
EventTimezoneFormMixin
,PrepopulateWithNextActiveEventMixin
,ModelAdmin
Admin interface for AKSlots
Uses a modified form (see
AKSlotAdminForm
)- form
alias of
AKSlotAdminForm
- class AKModel.admin.AvailabilityAdmin(model, admin_site)[source]
Bases:
EventTimezoneFormMixin
,ModelAdmin
Admin interface for Availabilities
- class AKModel.admin.AKOrgaMessageAdmin(model, admin_site)[source]
Bases:
ModelAdmin
Admin interface for AKOrgaMessages
- class AKModel.admin.ConstraintViolationAdminForm(*args, **kwargs)[source]
Bases:
ModelForm
Adapted admin form for constraint violations for usage in
ConstraintViolationAdmin
)Form fields:
- class AKModel.admin.ConstraintViolationAdmin(model, admin_site)[source]
Bases:
ModelAdmin
Admin interface for constraint violations Uses an adapted form (see
ConstraintViolationAdminForm
)- form
alias of
ConstraintViolationAdminForm
- class AKModel.admin.DefaultSlotAdminForm(*args, **kwargs)[source]
Bases:
ModelForm
Adapted admin form for DefaultSlot for usage in
DefaultSlotAdmin
Form fields:
- class AKModel.admin.DefaultSlotAdmin(model, admin_site)[source]
Bases:
EventTimezoneFormMixin
,ModelAdmin
Admin interface for default slots Uses an adapted form (see
DefaultSlotAdminForm
)- form
alias of
DefaultSlotAdminForm