Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

user satisfaction like polls

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

basic poll app

This small app provides an easy way to include an "user satisfaction poll" in your site.

install

pip install django-polls

then add django-polls to your INSTALLED_APPS:

INSTALLED_APPS = (...
    ...
    polls,
    ...)

add urls to your urlpatterns:

# urls.py
urlpatterns = patterns('',
    ...
    (r'^polls/', include('polls.urls')),
    ...)

and finally:

python manage.py syncdb

usage

first create a poll in django admin. then add in yout template:

{% polls_form poll next_url %}

and

{% polls_results poll %}

being 'next_url' the url where user will be redirected when user sends the poll, and 'poll' a Poll object:

render_to_response('mytmpl.html' {'poll': Poll.objects.get(pk=poll_id)});
Something went wrong with that request. Please try again.