Source

django-activefeedback /

Filename Size Date modified Message
feedback
245 B
1.0 KB
3.8 KB
413 B
1.1 KB

django-activefeedback

A little Django app for providing a simple feedback mechanism for users (a single feedback form) and a very simple workflow for dealing with feedback (slightly tweaked handling in the Django admin).

About the name: "django-feedback" was taken already. :)

Introduction

Here is how it works.

  • You provide links on your site to a feedback URL (e.g. /help/feedback/) which renders a feedback form along the lines of:

    I'd like to...
    [ Send general feedback             [v]]
    
    Your name:
    [                                                         ]
    
    Your email:
    [                                                         ]
    
    Subject:
    [                                                         ]
    
    Your comments or bug report:
    +---------------------------------------------------------+
    |                                                         |
    |                                                         |
    |                                                         |
    |                                                         |
    |                                                         |
    +---------------------------------------------------------+
    
    <Send>
    

If this form is visited by an authenticated user, the name and email fields are preloaded. If visited by an anonymous user a recaptcha item is added to the form to attempt to stop feedback spam.

  • The feedback gets stored in your site's database (see the Feedback model) and an email is sent to a settings.MANAGERS.

  • You can then respond, close and make notes on the feedback in the Django admin.

Setup

  • Put the "feedback" app package directory on your running site's Python sys.path.

  • Hook up the feedback URLs via something like this in your urls.py:

    (r'^help/feedback/', include('feedback.urls')),
    
  • Create feedback/feedback.html and feedback/feedback_done.html templates appropriate for your site. See the "sample-templates" directory for decent starter templates; they make some assumptions, like a "base.html" template to extend, so you'll probably need to edit them.

  • Optionally setup for recaptcha (recommended). By default if an anonymous user visits the form, the feedback app wants to put a captcha at the bottom of the form to defend against spam. First, you can control when captcha is enabled via the FEEDBACK_RECAPTCHA_ENABLED boolean setting. I frequently have this in my "settings.py":

    FEEDBACK_RECAPTCHA_ENABLED = not DEBUG
    

Then you'll need to set your recaptcha.net private and public keys as follows:

    RECAPTCHA_PUB_KEY = "<your pub key here>"
    RECAPTCHA_PRIVATE_KEY = "<your priv key here>"

And you'll also need the Python recaptcha client on your site's Python sys.path.

  • Optionally customize the feedback types by overriding the FEEDBACK_TYPE_CHOICES setting. The default is:

    (
        ("general", "Send general feedback"),
        ("question", "Ask a question"),
        ("bug", "Report a website bug"),
        ("suggestion", "Make a suggestion"),
        ("flag", "Flag a page as requiring moderator attention (e.g. spam)"),
    )
    

Admin

The feedback app does a little bit to make administration of feedback easier.

  • See all feedback at: /admin/feedback/feedback/
  • See all open feedback at: /admin/feedback/feedback/?is_closed__exact=0
  • There is a "whiteboard" field for taking notes on a particular feedback.