External Calendars

This package contains all views related to external calendars

External Calendar Actions

integreat_cms.cms.views.external_calendars.external_calendar_actions.delete_external_calendar(request: HttpRequest, calendar_id: int, region_slug: str) HttpResponseRedirect[source]

Delete external calendar

Parameters:
  • request (HttpRequest) – The current request

  • calendar_id (int) – The id of the calendar that should be deleted

  • region_slug (str) – The slug of the current region

Returns:

A redirection to the ExternalCalendarList

Return type:

HttpResponseRedirect

External Calendar Form View

class integreat_cms.cms.views.external_calendars.external_calendar_form_view.ExternalCalendarFormView(**kwargs)[source]

Bases: TemplateView

Form view for new external calendars in a region.

__init__(**kwargs)[source]

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

classmethod as_view(**initkwargs)[source]

Main entry point for a request-response process.

content_type = None[source]
dispatch(request, *args, **kwargs)[source]
extra_context = None[source]
get(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]

Render ExternalCalendarForm

Parameters:
  • request (HttpRequest) – The current request

  • *args (Any) – The supplied arguments

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

Returns:

The rendered template response

Return type:

HttpResponse

get_context_data(**kwargs)[source]
get_template_names()[source]

Return a list of template names to be used for the request. Must return a list. May not be called if render_to_response() is overridden.

http_method_names = ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace'][source]
http_method_not_allowed(request, *args, **kwargs)[source]
options(request, *args, **kwargs)[source]

Handle responding to requests for the OPTIONS HTTP verb.

post(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]

Submit ExternalCalendarForm and save ExternalCalendar object

Parameters:
  • request (HttpRequest) – The current request

  • *args (Any) – The supplied arguments

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

Returns:

The rendered template response

Return type:

HttpResponse

render_to_response(context, **response_kwargs)[source]

Return a response, using the response_class for this view, with a template rendered with the given context.

Pass response_kwargs to the constructor of the response class.

response_class[source]

alias of TemplateResponse

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

Initialize attributes shared by all view methods.

template_engine = None[source]
template_name = 'events/external_calendar_form.html'[source]
view_is_async = False[source]

External Calendar List View

class integreat_cms.cms.views.external_calendars.external_calendar_list_view.ExternalCalendarList(**kwargs)[source]

Bases: TemplateView

View for external calendars in regions.

__init__(**kwargs)[source]

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

classmethod as_view(**initkwargs)[source]

Main entry point for a request-response process.

content_type = None[source]
dispatch(request, *args, **kwargs)[source]
extra_context = None[source]
get(request, *args, **kwargs)[source]
get_context_data(**kwargs: Any) dict[str, Any][source]

Get external calendar list context data

Returns:

The context dictionary

Parameters:

kwargs (Any)

Return type:

dict[str, Any]

get_template_names()[source]

Return a list of template names to be used for the request. Must return a list. May not be called if render_to_response() is overridden.

http_method_names = ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace'][source]
http_method_not_allowed(request, *args, **kwargs)[source]
options(request, *args, **kwargs)[source]

Handle responding to requests for the OPTIONS HTTP verb.

render_to_response(context, **response_kwargs)[source]

Return a response, using the response_class for this view, with a template rendered with the given context.

Pass response_kwargs to the constructor of the response class.

response_class[source]

alias of TemplateResponse

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

Initialize attributes shared by all view methods.

template_engine = None[source]
template_name = 'events/external_calendar_list.html'[source]
view_is_async = False[source]