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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)feedback_ptr (
OneToOneField
toFeedback
) – Primary key: Feedback ptr (related name:eventfeedback
)event_translation (
ForeignKey
toEventTranslation
) – Event translation (related name:feedback
)
- 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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)feedback_ptr (
OneToOneField
toFeedback
) – Primary key: Feedback ptr (related name:eventlistfeedback
)
- 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
- 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:
id (BigAutoField) – Primary key: ID
rating (BooleanField) –
Rating. Whether the feedback is positive or negative
Manage choices in
feedback_ratings
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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)
Reverse relationships:
- Parameters:
eventfeedback (Reverse
OneToOneField
fromEventFeedback
) – The event feedback of this feedback (related name offeedback_ptr
)eventlistfeedback (Reverse
OneToOneField
fromEventListFeedback
) – The event list feedback of this feedback (related name offeedback_ptr
)imprintpagefeedback (Reverse
OneToOneField
fromImprintPageFeedback
) – The imprint feedback of this feedback (related name offeedback_ptr
)mapfeedback (Reverse
OneToOneField
fromMapFeedback
) – The map feedback of this feedback (related name offeedback_ptr
)offerfeedback (Reverse
OneToOneField
fromOfferFeedback
) – The offer feedback of this feedback (related name offeedback_ptr
)offerlistfeedback (Reverse
OneToOneField
fromOfferListFeedback
) – The offer list feedback of this feedback (related name offeedback_ptr
)pagefeedback (Reverse
OneToOneField
fromPageFeedback
) – The page feedback of this feedback (related name offeedback_ptr
)poifeedback (Reverse
OneToOneField
fromPOIFeedback
) – The location feedback of this feedback (related name offeedback_ptr
)regionfeedback (Reverse
OneToOneField
fromRegionFeedback
) – The region feedback of this feedback (related name offeedback_ptr
)searchresultfeedback (Reverse
OneToOneField
fromSearchResultFeedback
) – The search result feedback of this feedback (related name offeedback_ptr
)
- 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:
- polymorphic_ctype[source]
Type:
ForeignKey
toContentType
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
ifread_by
is set andFalse
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
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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)feedback_ptr (
OneToOneField
toFeedback
) – Primary key: Feedback ptr (related name:imprintpagefeedback
)
- 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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)feedback_ptr (
OneToOneField
toFeedback
) – Primary key: Feedback ptr (related name:mapfeedback
)
- 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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)feedback_ptr (
OneToOneField
toFeedback
) – Primary key: Feedback ptr (related name:offerfeedback
)offer (
ForeignKey
toOfferTemplate
) – Offer (related name:feedback
)
- 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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)feedback_ptr (
OneToOneField
toFeedback
) – Primary key: Feedback ptr (related name:offerlistfeedback
)
- 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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)feedback_ptr (
OneToOneField
toFeedback
) – Primary key: Feedback ptr (related name:pagefeedback
)page_translation (
ForeignKey
toPageTranslation
) – Page translation (related name:feedback
)
- 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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)feedback_ptr (
OneToOneField
toFeedback
) – Primary key: Feedback ptr (related name:poifeedback
)poi_translation (
ForeignKey
toPOITranslation
) – Location translation (related name:feedback
)
- 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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)feedback_ptr (
OneToOneField
toFeedback
) – Primary key: Feedback ptr (related name:regionfeedback
)
- 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:
polymorphic_ctype (
ForeignKey
toContentType
) – Polymorphic ctype (related name:feedback_set+
)region (
ForeignKey
toRegion
) – Region (related name:feedback
)language (
ForeignKey
toLanguage
) – Language (related name:feedback
)read_by (
ForeignKey
toUser
) – Marked as read by. The account that marked this feedback as read. If the feedback is unread, this field is empty. (related name:feedback
)feedback_ptr (
OneToOneField
toFeedback
) – Primary key: Feedback ptr (related name:searchresultfeedback
)
- 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