wagtail-feedback


Namewagtail-feedback JSON
Version 1.3.2 PyPI version JSON
download
home_pagehttps://github.com/Nigel2392/wagtail_feedback
SummaryA Django/Wagtail app to easily ask users for feedback.
upload_time2024-03-18 15:06:08
maintainer
docs_urlNone
authorNigel
requires_python>=3.8
licenseGPL-3.0-only
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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
-----------

1. Add `wagtail_feedback` and `django_filters` to your INSTALLED_APPS setting like this:

   ```python
   INSTALLED_APPS = [
   	# ...,
   	'feedback',
   	'django_filters',
   ]
   ```
2. include  `feedback.urls` in your URLconf.

   ```python
   urlpatterns = [
       ...
       include('feedback.urls')
   ]
   ```
3. In your template, load the feedback template tag to use the feedback form.

   ```html
   {% 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 %}
   ```
4. **(Optional)** Include the feedback panel in your page definition:

   ```python
   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:*

```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Nigel2392/wagtail_feedback",
    "name": "wagtail-feedback",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Nigel",
    "author_email": "nigel@goodadvice.it",
    "download_url": "https://files.pythonhosted.org/packages/51/6f/26ed9b19aac27d1255ebfe263df864d36d9be6836d101521579ec9feced3/wagtail_feedback-1.3.2.tar.gz",
    "platform": null,
    "description": "wagtail_feedback\r\n================\r\n\r\nA simple wagtail application for letting users give feedback on your wagtail pages - provides easily readable and accessible aggregates in the page admin via `FeedbackPanel`\r\n\r\nNote:\r\n\r\n* Your `page.get_context` method must implement *args and **kwargs.\r\n\r\nQuick start\r\n-----------\r\n\r\n1. Add `wagtail_feedback` and `django_filters` to your INSTALLED_APPS setting like this:\r\n\r\n   ```python\r\n   INSTALLED_APPS = [\r\n   \t# ...,\r\n   \t'feedback',\r\n   \t'django_filters',\r\n   ]\r\n   ```\r\n2. include  `feedback.urls` in your URLconf.\r\n\r\n   ```python\r\n   urlpatterns = [\r\n       ...\r\n       include('feedback.urls')\r\n   ]\r\n   ```\r\n3. In your template, load the feedback template tag to use the feedback form.\r\n\r\n   ```html\r\n   {% load feedback %}\r\n\r\n   {# Loads the appropriate CSS styles. `{% static 'feedback/css/feedback.css'%}` #}\r\n   {% feedback_css %} \r\n\r\n   {# Loads HTMX, if you have HTMX loaded in your template this is not nescessary. `{% static 'feedback/js/feedback.js'%}` #}\r\n   {% feedback_js %}  \r\n\r\n   {% feedback page=self %}\r\n   ```\r\n4. **(Optional)** Include the feedback panel in your page definition:\r\n\r\n   ```python\r\n   from wagtail.models import Page\r\n   from feedback.panels import FeedbackPanel\r\n\r\n   class MyPage(Page):\r\n   \tcontent_panels = Page.content_panels + [\r\n   \t\tFeedbackPanel()\r\n   \t]\r\n\r\n   ```\r\n\r\n## Easily configurable settings:\r\n\r\n### **A class for creating custom implementations of a feedback model**\r\n\r\n`FEEDBACK_MODEL_NAME` *default: `feedback.Feedback`*\r\n\r\n### **A form class for saving custom fields on your own custom feedback model:**\r\n\r\n`FEEDBACK_FORM_CLASS` *default: `feedback.forms.FeedbackForm`*\r\n\r\n### **Filters for the admin in-panel list-view.**\r\n\r\n`FEEDBACK_FILTER_CLASS` *default: `feedback.filters.AbstractFeedbackFilter`*\r\n\r\n### **Backends for validating feedback before and after submit**\r\n\r\n`FEEDBACK_BACKEND` *default:*\r\n\r\n```python\r\nFEEDBACK_BACKEND = getattr(settings, \"FEEDBACK_BACKEND\", {\r\n    \"CLASS\": \"feedback.backends.SessionBasedFeedbackend\",\r\n    \"OPTIONS\": {\r\n    \t# ... Options passed to class\r\n    }\r\n\r\n})\r\n```\r\n\r\nOther backends include:\r\n\r\n* `feedback.backends.SessionBasedFeedbackend`\r\n* `feedback.backends.PageBasedFeedbackend`\r\n* `feedback.backends.Feedbackend` *(base implementation)*\r\n\r\n\r\n## **Custom page methods for specifying messages/functionality**\r\n\r\nSpecifies if the user is allowed to leave a message on positive feedback for this page.\r\n\r\n`def allow_feedback_message_on_positive(self):`\r\n\r\nSpecifies the title shown above the feedback form.\r\n`def get_feedback_title(self):`\r\n\r\nHow you would like to thank your user after submitting the feedback\r\n`def get_feedback_thanks(self):`\r\n\r\nA simple short description explaining why you are asking for feedback\r\n`def get_feedback_explainer(self):`\r\n\r\nText shown when the user hovers over the positive icon.\r\n`def get_feedback_positive_text(self):`\r\n\r\nText shown when the user hovers over the negative icon.\r\n`def get_feedback_negative_text(self):`\r\n\r\n## **Django proxy settings to get IP-adress**\r\n\r\n`USE_X_FORWARDED_HOST` *default: `False`*\r\n\r\nUsed for setting the appropriate IP-adress on the\r\n\r\nfeedback model / when using the backend.\r\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-only",
    "summary": "A Django/Wagtail app to easily ask users for feedback.",
    "version": "1.3.2",
    "project_urls": {
        "Homepage": "https://github.com/Nigel2392/wagtail_feedback"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "516f26ed9b19aac27d1255ebfe263df864d36d9be6836d101521579ec9feced3",
                "md5": "bc5433d80c8299cb8f44f698eab0a813",
                "sha256": "b040de020f32dbee548a8abb289eeecc217a93f8ed3d567d6584e5b2fa8d6961"
            },
            "downloads": -1,
            "filename": "wagtail_feedback-1.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bc5433d80c8299cb8f44f698eab0a813",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 60093,
            "upload_time": "2024-03-18T15:06:08",
            "upload_time_iso_8601": "2024-03-18T15:06:08.477792Z",
            "url": "https://files.pythonhosted.org/packages/51/6f/26ed9b19aac27d1255ebfe263df864d36d9be6836d101521579ec9feced3/wagtail_feedback-1.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 15:06:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Nigel2392",
    "github_project": "wagtail_feedback",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "wagtail-feedback"
}
        
Elapsed time: 0.21192s