This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Writeback is a pluggable customizable Django app to collect feedback from site visitors using AJAX.

Installation

Install using pip:

pip install django-writeback

Quick start

  • Add “writeback” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS += ('writeback', )
    
  • Add context processor to your TEMPLATE_CONTEXT_PROCESSORS setting like this:

    TEMPLATE_CONTEXT_PROCESSORS += ('writeback.context.add_form', )
    
  • Specify email settings WRITEBACK_EMAIL_NOTIFICATION_SUBJECT, WRITEBACK_EMAIL_NOTIFICATION_FROM and WRITEBACK_EMAIL_NOTIFICATION_TO_LIST. These will be used in email notifications.

  • Run python manage.py syncdb to synchronize the database.

  • Run python manage.py collectstatic or python manage.py collectstatic -i admin, if you want to omit collecting static for the admin app.

  • Include the writeback URLconf in your project urls.py like this:

    url(r'^writeback/', include('writeback.urls')),
    
  • Modify your base template:

    <!-- in header block -->
    {% include "writeback/header.html" %}
    
    <!-- in body block -->
    {% include "writeback/button.html" %}
    
  • Override email_notification.html and button.html templates.

Model customization

The Message model, which is used for collecting feedback, can be extended:

  • Create an app, for example custom_writeback with a file, which shall contain class declaration, name it, models.py, for example.

  • Add this newly created app to your INSTALLED_APPS setting like this:

    INSTALLED_APPS += ('custom_writeback', )
    
  • Declare your abstract model class anew or, if you want to extend the base model, inherit it from writeback.models.MessageAbstract like so:

    from writeback.models import MessageAbstract
    
    
    class MyMessageAbstract(MessageAbstract):
        # define your custom fields
    
        class Meta(MessageAbstract.Meta):
            pass
    
  • Register your class in the project’s settings.py:

    WRITEBACK_MESSAGE_BASE_MODEL = 'custom_writeback.models.MyMessageAbstract'
    
  • Define a new form, which shall be used for the new model.

Form customization

If you have overriden or customized the Message model, you most probably need to customize the form. But even if you use the original model, you may want to change the form clean() method.

  • Create an app, for example custom_writeback (if you haven’t already) with a file, which shall contain class declaration, name it, forms.py, for example.

  • Add this newly created app to your INSTALLED_APPS setting like this:

    INSTALLED_APPS += ('custom_writeback', )
    
  • Declare your new form-class like so:

    from django.utils.translation import ugettext_lazy as _
    from django.forms import ValidationError
    
    from writeback.forms import MessageCreateFormBase
    from writeback.models import Message
    
    
    class MessageCreateForm(MessageCreateFormBase):
        class Meta:
            model = Message
            exclude = ['date_created', 'middle_name', 'company', 'info']
    
        def clean(self):
            cleaned_data = super(MessageCreateFormBase, self).clean()
            name = cleaned_data.get("name")
            family_name = cleaned_data.get("family_name")
            phone = cleaned_data.get("phone")
            email = cleaned_data.get("email")
    
            if not (name or family_name or phone or email):
                raise ValidationError(_("Please, fill out at least one field."))
    
            return super(MessageCreateFormBase, self).clean()
    
  • Register your class in the project’s settings.py:

    WRITEBACK_MESSAGE_BASE_FORM = 'custom_writeback.forms.MessageCreateForm'
    
Release History

Release History

0.3.9

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.10

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-writeback-0.3.9.tar.gz (51.3 kB) Copy SHA256 Checksum SHA256 Source Nov 14, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting