Events

Forms for creating or saving event objects and their corresponding event translation objects and recurrence rule objects

Event Filter Form

Form for submitting filter requests

class integreat_cms.cms.forms.events.event_filter_form.EventFilterForm(**kwargs: Any)[source]

Bases: CustomFilterForm

Form to filter the event list

Form fields:

Parameters:

kwargs (Any)

apply(events: EventQuerySet, region: Region, language_slug: str) tuple[EventQuerySet, None, None][source]

Filter the events according to the given filter data

Parameters:
  • events (EventQuerySet) – The list of events

  • region (Region) – The current region

  • language_slug (str) – The slug of the current language

Returns:

The filtered list of events, the poi used for filtering, and the search query

Return type:

tuple[EventQuerySet, None, None]

property media[source]

Return all media required to render the widgets on this form.

Event Form

class integreat_cms.cms.forms.events.event_form.EventForm(**kwargs: Any)[source]

Bases: CustomModelForm

Form for creating and modifying event objects

Form fields:

Parameters:

kwargs (Any)

__init__(**kwargs: Any) None[source]

Initialize event form

Parameters:

**kwargs (Any) – The supplied keyword arguments

Return type:

None

clean() dict[str, Any][source]

Validate form fields which depend on each other, see django.forms.Form.clean()

Returns:

The cleaned form data

Return type:

dict[str, Any]

property media[source]

Return all media required to render the widgets on this form.

save(commit: bool = True) Any[source]

This method extends the default save()-method of the base ModelForm to provide debug logging

Parameters:

commit (bool) – Whether or not the changes should be written to the database

Returns:

The saved object returned by The save() method

Return type:

Any

Event Translation Form

class integreat_cms.cms.forms.events.event_translation_form.EventTranslationForm(**kwargs: Any)[source]

Bases: MachineTranslationForm

Form for creating and modifying event translation objects

Form fields:

Parameters:

kwargs (Any)

property media[source]

Return all media required to render the widgets on this form.

External Calendar Form

class integreat_cms.cms.forms.events.external_calendar_form.ExternalCalendarForm(user: User | None, *args: Any, **kwargs: Any)[source]

Bases: CustomModelForm

Form for adding a new external calendar

Form fields:

  • name: Calendar name (CharField)

  • url: URL (URLField)

  • import_filter_category: The category that events need to have to get imported (Leave blank to import all events) (CharField)

Parameters:
  • user (User | None)

  • args (Any)

  • kwargs (Any)

__init__(user: User | None, *args: Any, **kwargs: Any) None[source]

Initialize placeholder model form

Parameters:
  • **kwargs (Any) – The supplied keyword arguments

  • user (User | None)

  • args (Any)

  • **kwargs

Raises:

TypeError – If form is instantiated directly without an inheriting subclass

Return type:

None

property media[source]

Return all media required to render the widgets on this form.

Recurrence Rule Form

class integreat_cms.cms.forms.events.recurrence_rule_form.RecurrenceRuleForm(**kwargs: Any)[source]

Bases: CustomModelForm

Form for creating and modifying event recurrence rule objects

Form fields:

Parameters:

kwargs (Any)

__init__(**kwargs: Any) None[source]

Initialize recurrence rule form

Parameters:

**kwargs (Any) – The supplied keyword arguments

Return type:

None

clean() dict[str, Any][source]

Validate form fields which depend on each other, see django.forms.Form.clean()

Returns:

The cleaned form data

Return type:

dict[str, Any]

has_changed() bool[source]

This function provides a workaround for the weekdays_for_weekly field to be correctly recognized as changed.

Returns:

Whether or not the recurrence rule form has changed

Return type:

bool

property media[source]

Return all media required to render the widgets on this form.