Feedback

This package contains all feedback-related data models: The base model Feedback as well as the following sub-models:

Event Feedback

class integreat_cms.cms.models.feedback.event_feedback.EventFeedback(*args, **kwargs)[source]

Bases: Feedback

Database model representing feedback about events.

Parameters:
  • id (BigAutoField) – Primary key: ID

  • rating (BooleanField) – Rating. Whether the feedback is positive or negative

  • comment (TextField) – Comment

  • is_technical (BooleanField) – Technical. Whether or not the feedback is targeted at the developers

  • archived (BooleanField) – Archived. Whether or not the feedback is archived

  • created_date (DateTimeField) – Creation date

Relationship fields:

Parameters:
exception DoesNotExist[source]

Bases: DoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

best_event_translation[source]

This property returns the best translation for the event this feedback comments on.

Returns:

The best event translation

property object_name: str[source]

This property returns the name of the object this feedback comments on.

Returns:

The name of the object this feedback refers to

object_url[source]

This property returns the url to the object this feedback comments on.

Returns:

The url to the referred object

property related_feedback: QuerySet[EventFeedback][source]

This property returns all feedback entries which relate to the same object and have the same is_technical value.

Returns:

The queryset of related feedback

Event List Feedback

class integreat_cms.cms.models.feedback.event_list_feedback.EventListFeedback(*args, **kwargs)[source]

Bases: Feedback

Database model representing feedback about the event list (e.g. missing events).

Parameters:
  • id (BigAutoField) – Primary key: ID

  • rating (BooleanField) – Rating. Whether the feedback is positive or negative

  • comment (TextField) – Comment

  • is_technical (BooleanField) – Technical. Whether or not the feedback is targeted at the developers

  • archived (BooleanField) – Archived. Whether or not the feedback is archived

  • created_date (DateTimeField) – Creation date

Relationship fields:

Parameters:
exception DoesNotExist[source]

Bases: DoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

property object_name: str[source]

This property returns the name of the object this feedback comments on.

Returns:

The name of the object this feedback refers to

object_url[source]

This property returns the url to the object this feedback comments on.

Returns:

The url to the referred object

property related_feedback: QuerySet[EventListFeedback][source]

This property returns all feedback entries which relate to the same object and have the same is_technical value.

Returns:

The queryset of related feedback

Feedback

class integreat_cms.cms.models.feedback.feedback.CascadeDeletePolymorphicManager(*args, **kwargs)[source]

Bases: PolymorphicManager

This class is used as a workaround for a bug in django-polymorphic. For more information, see CascadeDeletePolymorphicQuerySet.

queryset_class[source]

alias of CascadeDeletePolymorphicQuerySet

class integreat_cms.cms.models.feedback.feedback.CascadeDeletePolymorphicQuerySet(*args, **kwargs)[source]

Bases: PolymorphicQuerySet

Patch the QuerySet to call delete on the non_polymorphic QuerySet, avoiding models.deletion.Collector typing problem

Based on workarounds proposed in: https://github.com/django-polymorphic/django-polymorphic/issues/229 See also: https://github.com/django-polymorphic/django-polymorphic/issues/34, https://github.com/django-polymorphic/django-polymorphic/issues/84 Related Django ticket: https://code.djangoproject.com/ticket/23076

delete() tuple[int, dict[str, int]][source]

This method deletes all objects in this QuerySet.

Returns:

A tuple of the number of objects delete and the delete objects grouped by their type

Return type:

tuple[int, dict[str, int]]

class integreat_cms.cms.models.feedback.feedback.Feedback(*args, **kwargs)[source]

Bases: PolymorphicModel, AbstractBaseModel

Database model representing feedback from app-users. Do not directly create instances of this base model, but of the submodels (e.g. PageFeedback) instead.

Parameters:

Relationship fields:

Parameters:

Reverse relationships:

Parameters:
exception DoesNotExist[source]

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

property category: str[source]

This property returns the category (verbose name of the submodel) of this feedback object.

Returns:

capitalized category

get_repr() str[source]

This overwrites the default Django __repr__() method which would return <Feedback: Feedback object (id)>. It is used for logging.

Returns:

The canonical string representation of the feedback

Return type:

str

polymorphic_ctype[source]

Type: ForeignKey to ContentType

Polymorphic ctype (related name: feedback_set+)

The model field that stores the ContentType reference to the actual class.

rating[source]

Type: BooleanField

Rating. Whether the feedback is positive or negative

Choices:

  • True

  • False

  • None

Manage choices in feedback_ratings

rating_sum_negative[source]

This property returns the sum of the down-ratings of this object.

Returns:

The number of negative ratings on this feedback object

rating_sum_positive[source]

This property returns the sum of the up-ratings of this object.

Returns:

The number of positive ratings on this feedback object

property read: bool[source]

This property returns whether or not the feedback is marked as read or not. It is True if read_by is set and False otherwise.

Returns:

Whether the feedback is marked as read

classmethod search(region: Region | None, query: str) QuerySet[source]

Searches for all feedbacks which match the given query in their comment. :param region: The current region or None for non-regional feedback :param query: The query string used for filtering the events :return: A query for all matching objects

Parameters:
Return type:

QuerySet

Imprint Page Feedback

class integreat_cms.cms.models.feedback.imprint_page_feedback.ImprintPageFeedback(*args, **kwargs)[source]

Bases: Feedback

Database model representing feedback about imprint pages.

Parameters:
  • id (BigAutoField) – Primary key: ID

  • rating (BooleanField) – Rating. Whether the feedback is positive or negative

  • comment (TextField) – Comment

  • is_technical (BooleanField) – Technical. Whether or not the feedback is targeted at the developers

  • archived (BooleanField) – Archived. Whether or not the feedback is archived

  • created_date (DateTimeField) – Creation date

Relationship fields:

Parameters:
exception DoesNotExist[source]

Bases: DoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

property object_name: str[source]

This property returns the name of the object this feedback comments on.

Returns:

The name of the object this feedback refers to

object_url[source]

This property returns the url to the object this feedback comments on.

Returns:

The url to the referred object

property related_feedback: QuerySet[ImprintPageFeedback][source]

This property returns all feedback entries which relate to the same object and have the same is_technical value.

Returns:

The queryset of related feedback

Map Feedback

class integreat_cms.cms.models.feedback.map_feedback.MapFeedback(*args, **kwargs)[source]

Bases: Feedback

Database model representing feedback about the map (e.g. missing pois).

Parameters:
  • id (BigAutoField) – Primary key: ID

  • rating (BooleanField) – Rating. Whether the feedback is positive or negative

  • comment (TextField) – Comment

  • is_technical (BooleanField) – Technical. Whether or not the feedback is targeted at the developers

  • archived (BooleanField) – Archived. Whether or not the feedback is archived

  • created_date (DateTimeField) – Creation date

Relationship fields:

Parameters:
exception DoesNotExist[source]

Bases: DoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

property object_name: str[source]

This property returns the name of the object this feedback comments on.

Returns:

The name of the object this feedback refers to

object_url[source]

This property returns the url to the object this feedback comments on.

Returns:

The url to the referred object

property related_feedback: QuerySet[MapFeedback][source]

This property returns all feedback entries which relate to the same object and have the same is_technical value.

Returns:

The queryset of related feedback

Offer Feedback

class integreat_cms.cms.models.feedback.offer_feedback.OfferFeedback(*args, **kwargs)[source]

Bases: Feedback

Database model representing feedback about offers.

Parameters:
  • id (BigAutoField) – Primary key: ID

  • rating (BooleanField) – Rating. Whether the feedback is positive or negative

  • comment (TextField) – Comment

  • is_technical (BooleanField) – Technical. Whether or not the feedback is targeted at the developers

  • archived (BooleanField) – Archived. Whether or not the feedback is archived

  • created_date (DateTimeField) – Creation date

Relationship fields:

Parameters:
exception DoesNotExist[source]

Bases: DoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

property object_name: str[source]

This property returns the name of the object this feedback comments on.

Returns:

The name of the object this feedback refers to

object_url[source]

This property returns the url to the object this feedback comments on.

Returns:

The url to the referred object

property related_feedback: QuerySet[OfferFeedback][source]

This property returns all feedback entries which relate to the same object and have the same is_technical value.

Returns:

The queryset of related feedback

Offer List Feedback

class integreat_cms.cms.models.feedback.offer_list_feedback.OfferListFeedback(*args, **kwargs)[source]

Bases: Feedback

Database model representing feedback about the offer list (e.g. missing offers).

Parameters:
  • id (BigAutoField) – Primary key: ID

  • rating (BooleanField) – Rating. Whether the feedback is positive or negative

  • comment (TextField) – Comment

  • is_technical (BooleanField) – Technical. Whether or not the feedback is targeted at the developers

  • archived (BooleanField) – Archived. Whether or not the feedback is archived

  • created_date (DateTimeField) – Creation date

Relationship fields:

Parameters:
exception DoesNotExist[source]

Bases: DoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

property object_name: str[source]

This property returns the name of the object this feedback comments on.

Returns:

The name of the object this feedback refers to

object_url[source]

This property returns the url to the object this feedback comments on.

Returns:

The url to the referred object

property related_feedback: QuerySet[OfferListFeedback][source]

This property returns all feedback entries which relate to the same object and have the same is_technical value.

Returns:

The queryset of related feedback

Page Feedback

class integreat_cms.cms.models.feedback.page_feedback.PageFeedback(*args, **kwargs)[source]

Bases: Feedback

Database model representing feedback about pages.

Parameters:
  • id (BigAutoField) – Primary key: ID

  • rating (BooleanField) – Rating. Whether the feedback is positive or negative

  • comment (TextField) – Comment

  • is_technical (BooleanField) – Technical. Whether or not the feedback is targeted at the developers

  • archived (BooleanField) – Archived. Whether or not the feedback is archived

  • created_date (DateTimeField) – Creation date

Relationship fields:

Parameters:
exception DoesNotExist[source]

Bases: DoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

best_page_translation[source]

This property returns the best translation for the page this feedback comments on.

Returns:

The best page translation

property object_name: str[source]

This property returns the name of the object this feedback comments on.

Returns:

The name of the object this feedback refers to

object_url[source]

This property returns the url to the object this feedback comments on.

Returns:

The url to the referred object

property related_feedback: QuerySet[PageFeedback][source]

This property returns all feedback entries which relate to the same object and have the same is_technical value.

Returns:

The queryset of related feedback

POI Feedback

class integreat_cms.cms.models.feedback.poi_feedback.POIFeedback(*args, **kwargs)[source]

Bases: Feedback

Database model representing feedback about events.

Parameters:
  • id (BigAutoField) – Primary key: ID

  • rating (BooleanField) – Rating. Whether the feedback is positive or negative

  • comment (TextField) – Comment

  • is_technical (BooleanField) – Technical. Whether or not the feedback is targeted at the developers

  • archived (BooleanField) – Archived. Whether or not the feedback is archived

  • created_date (DateTimeField) – Creation date

Relationship fields:

Parameters:
exception DoesNotExist[source]

Bases: DoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

best_poi_translation[source]

This property returns the best translation for the POI this feedback comments on.

Returns:

The best poi translation

property object_name: str[source]

This property returns the name of the object this feedback comments on.

Returns:

The name of the object this feedback refers to

object_url[source]

This property returns the url to the object this feedback comments on.

Returns:

The url to the referred object

property related_feedback: QuerySet[POIFeedback][source]

This property returns all feedback entries which relate to the same object and have the same is_technical value.

Returns:

The queryset of related feedback

Region Feedback

class integreat_cms.cms.models.feedback.region_feedback.RegionFeedback(*args, **kwargs)[source]

Bases: Feedback

Database model representing feedback about regions in general.

Parameters:
  • id (BigAutoField) – Primary key: ID

  • rating (BooleanField) – Rating. Whether the feedback is positive or negative

  • comment (TextField) – Comment

  • is_technical (BooleanField) – Technical. Whether or not the feedback is targeted at the developers

  • archived (BooleanField) – Archived. Whether or not the feedback is archived

  • created_date (DateTimeField) – Creation date

Relationship fields:

Parameters:
exception DoesNotExist[source]

Bases: DoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

property object_name: str[source]

This property returns the name of the object this feedback comments on.

Returns:

The name of the object this feedback refers to

object_url[source]

This property returns the url to the object this feedback comments on.

Returns:

The url to the referred object

property related_feedback: QuerySet[RegionFeedback][source]

This property returns all feedback entries which relate to the same object and have the same is_technical value.

Returns:

The queryset of related feedback

Search Result Feedback

class integreat_cms.cms.models.feedback.search_result_feedback.SearchResultFeedback(*args, **kwargs)[source]

Bases: Feedback

Database model representing feedback about search results (e.g. empty results).

Parameters:
  • id (BigAutoField) – Primary key: ID

  • rating (BooleanField) – Rating. Whether the feedback is positive or negative

  • comment (TextField) – Comment

  • is_technical (BooleanField) – Technical. Whether or not the feedback is targeted at the developers

  • archived (BooleanField) – Archived. Whether or not the feedback is archived

  • created_date (DateTimeField) – Creation date

  • search_query (CharField) – Search term

Relationship fields:

Parameters:
exception DoesNotExist[source]

Bases: DoesNotExist

exception MultipleObjectsReturned[source]

Bases: MultipleObjectsReturned

property object_name: str[source]

This property returns the name of the object this feedback comments on.

Returns:

The name of the object this feedback refers to

object_url[source]

This property returns the url to the object this feedback comments on.

Returns:

The url to the referred object

property related_feedback: QuerySet[SearchResultFeedback][source]

This property returns all feedback entries which relate to the same object and have the same is_technical value.

Returns:

The queryset of related feedback