Feedback

This package contains all views related to feedback

Admin Feedback Actions

This module contains action methods for feedback items (archive, restore, …)

integreat_cms.cms.views.feedback.admin_feedback_actions.archive_admin_feedback(request: HttpRequest) HttpResponseRedirect[source]

Archive a list of feedback items

Parameters:

request (HttpRequest) – Object representing the user call

Returns:

A redirection to the admin feedback list

Return type:

HttpResponseRedirect

integreat_cms.cms.views.feedback.admin_feedback_actions.delete_admin_feedback(request: HttpRequest) HttpResponseRedirect[source]

Delete a list of feedback items

Parameters:

request (HttpRequest) – Object representing the user call

Returns:

A redirection to the admin feedback list

Return type:

HttpResponseRedirect

integreat_cms.cms.views.feedback.admin_feedback_actions.mark_admin_feedback_as_read(request: HttpRequest) HttpResponseRedirect[source]

Set read flag for a list of feedback items

Parameters:

request (HttpRequest) – Object representing the user call

Returns:

A redirection to the admin feedback list

Return type:

HttpResponseRedirect

integreat_cms.cms.views.feedback.admin_feedback_actions.mark_admin_feedback_as_unread(request: HttpRequest) HttpResponseRedirect[source]

Unset read flag for a list of feedback items

Parameters:

request (HttpRequest) – Object representing the user call

Returns:

A redirection to the admin feedback list

Return type:

HttpResponseRedirect

integreat_cms.cms.views.feedback.admin_feedback_actions.restore_admin_feedback(request: HttpRequest) HttpResponseRedirect[source]

Restore a list of feedback items

Parameters:

request (HttpRequest) – Object representing the user call

Returns:

A redirection to the admin feedback list

Return type:

HttpResponseRedirect

Admin Feedback List View

class integreat_cms.cms.views.feedback.admin_feedback_list_view.AdminFeedbackListView(**kwargs)[source]

Bases: TemplateView

View to list all admin feedback (technical feedback)

archived = False[source]

Whether or not to show archived feedback

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

Render admin feedback list

Parameters:
  • request (HttpRequest) – Object representing the user call

  • *args (Any) – The supplied arguments

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

Returns:

The rendered template response

Return type:

HttpResponse

template = 'feedback/admin_feedback_list.html'[source]

The template to render (see TemplateResponseMixin)

property template_name: str[source]

Select correct HTML template, depending on archived flag (see TemplateResponseMixin)

Returns:

Path to HTML template

Feedback Resource

class integreat_cms.cms.views.feedback.feedback_resource.FeedbackResource(**kwargs)[source]

Bases: ModelResource

This is the Resource class that connects to the django-import-export library

get_instance(*args: Any, **kwargs: Any) Any[source]

See import_export.resources.Resource.get_instance()

Parameters:
Return type:

Any

import_data(*args: Any, **kwargs: Any) Any[source]

See import_export.resources.Resource.import_data()

Parameters:
Return type:

Any

import_row(*args: Any, **kwargs: Any) Any[source]

See import_export.resources.Resource.import_row()

Parameters:
Return type:

Any

save_instance(*args: Any, **kwargs: Any) Any[source]

See import_export.resources.Resource.save_instance()

Parameters:
Return type:

Any

Region Feedback Actions

This module contains action methods for feedback items (archive, restore, …)

integreat_cms.cms.views.feedback.region_feedback_actions.archive_region_feedback(request: HttpRequest, region_slug: str) HttpResponseRedirect[source]

Archive a list of feedback items

Parameters:
  • request (HttpRequest) – Object representing the user call

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

Returns:

A redirection to the region feedback list

Return type:

HttpResponseRedirect

integreat_cms.cms.views.feedback.region_feedback_actions.delete_region_feedback(request: HttpRequest, region_slug: str) HttpResponseRedirect[source]

Delete a list of feedback items

Parameters:
  • request (HttpRequest) – Object representing the user call

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

Returns:

A redirection to the region feedback list

Return type:

HttpResponseRedirect

integreat_cms.cms.views.feedback.region_feedback_actions.export_region_feedback(request: HttpRequest, region_slug: str, file_format: str) HttpResponse[source]

Export a list of feedback items

Parameters:
  • request (HttpRequest) – Object representing the user call

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

  • file_format (str) – The export format

Returns:

Response with file

Return type:

HttpResponse

integreat_cms.cms.views.feedback.region_feedback_actions.mark_region_feedback_as_read(request: HttpRequest, region_slug: str) HttpResponseRedirect[source]

Set read flag for a list of feedback items

Parameters:
  • request (HttpRequest) – Object representing the user call

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

Returns:

A redirection to the region feedback list

Return type:

HttpResponseRedirect

integreat_cms.cms.views.feedback.region_feedback_actions.mark_region_feedback_as_unread(request: HttpRequest, region_slug: str) HttpResponseRedirect[source]

Unset read flag for a list of feedback items

Parameters:
  • request (HttpRequest) – Object representing the user call

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

Returns:

A redirection to the region feedback list

Return type:

HttpResponseRedirect

integreat_cms.cms.views.feedback.region_feedback_actions.restore_region_feedback(request: HttpRequest, region_slug: str) HttpResponseRedirect[source]

Restore a list of feedback items

Parameters:
  • request (HttpRequest) – Object representing the user call

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

Returns:

A redirection to the region feedback list

Return type:

HttpResponseRedirect

Region Feedback List View

class integreat_cms.cms.views.feedback.region_feedback_list_view.RegionFeedbackListView(**kwargs)[source]

Bases: TemplateView

View to list all region feedback (content feedback)

archived = False[source]

Whether or not to show archived feedback

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

Render region feedback list

Parameters:
  • request (HttpRequest) – Object representing the user call

  • *args (Any) – The supplied arguments

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

Returns:

The rendered template response

Return type:

HttpResponse

template = 'feedback/region_feedback_list.html'[source]

The template to render (see TemplateResponseMixin)

property template_name: str[source]

Select correct HTML template, depending on archived flag (see TemplateResponseMixin) :return: Path to HTML template