A Django/Wagtail app to easily ask users for feedback.
Project description
wagtail_feedback
A simple wagtail application for letting users give feedback on your wagtail pages - provides easily readable and accessible aggregates in the page admin via FeedbackPanel
Note:
- Your
page.get_context
method must implement *args and **kwargs.
Quick start
-
Add
wagtail_feedback
anddjango_filters
to your INSTALLED_APPS setting like this:INSTALLED_APPS = [ # ..., 'feedback', 'django_filters', ]
-
include
feedback.urls
in your URLconf.urlpatterns = [ ... include('feedback.urls') ]
-
In your template, load the feedback template tag to use the feedback form.
{% load feedback %} {# Loads the appropriate CSS styles. `{% static 'feedback/css/feedback.css'%}` #} {% feedback_css %} {# Loads HTMX, if you have HTMX loaded in your template this is not nescessary. `{% static 'feedback/js/feedback.js'%}` #} {% feedback_js %} {% feedback page=self %}
-
(Optional) Include the feedback panel in your page definition:
from wagtail.models import Page from feedback.panels import FeedbackPanel class MyPage(Page): content_panels = Page.content_panels + [ FeedbackPanel() ]
Easily configurable settings:
A class for creating custom implementations of a feedback model
FEEDBACK_MODEL_NAME
default: feedback.Feedback
A form class for saving custom fields on your own custom feedback model:
FEEDBACK_FORM_CLASS
default: feedback.forms.FeedbackForm
Filters for the admin in-panel list-view.
FEEDBACK_FILTER_CLASS
default: feedback.filters.AbstractFeedbackFilter
Backends for validating feedback before and after submit
FEEDBACK_BACKEND
default:
FEEDBACK_BACKEND = getattr(settings, "FEEDBACK_BACKEND", {
"CLASS": "feedback.backends.SessionBasedFeedbackend",
"OPTIONS": {
# ... Options passed to class
}
})
Other backends include:
feedback.backends.SessionBasedFeedbackend
feedback.backends.PageBasedFeedbackend
feedback.backends.Feedbackend
(base implementation)
Custom page methods for specifying messages/functionality
Specifies if the user is allowed to leave a message on positive feedback for this page.
def allow_feedback_message_on_positive(self):
Specifies the title shown above the feedback form.
def get_feedback_title(self):
How you would like to thank your user after submitting the feedback
def get_feedback_thanks(self):
A simple short description explaining why you are asking for feedback
def get_feedback_explainer(self):
Text shown when the user hovers over the positive icon.
def get_feedback_positive_text(self):
Text shown when the user hovers over the negative icon.
def get_feedback_negative_text(self):
Django proxy settings to get IP-adress
USE_X_FORWARDED_HOST
default: False
Used for setting the appropriate IP-adress on the
feedback model / when using the backend.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file wagtail_feedback-1.3.2.tar.gz
.
File metadata
- Download URL: wagtail_feedback-1.3.2.tar.gz
- Upload date:
- Size: 60.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b040de020f32dbee548a8abb289eeecc217a93f8ed3d567d6584e5b2fa8d6961 |
|
MD5 | bc5433d80c8299cb8f44f698eab0a813 |
|
BLAKE2b-256 | 516f26ed9b19aac27d1255ebfe263df864d36d9be6836d101521579ec9feced3 |