Simple Django poll application.
pip install django-simple-poll
Install latest from github:
pip install -e git+https://github.com/applecat/django-simple-poll.git#egg=django-simple-poll
Django 1.10+, Python 2.7, 3.4+
-
Add 'poll' application in the
INSTALLED_APPSsettings:INSTALLED_APPS = ( ... 'poll', ) -
Add the poll's url to your urls.py.
urlpatterns = [ ... url(r'^poll/', include('poll.urls')), ] -
Run
python manage.py migrate -
Add this tags in your template file to show the poll:
{% load poll_tags %} ... {% poll %} -
Check if jQuery is already included on the page. If don't — add it:
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
- Make vote, see the results:
Of course, you can (and probably, should) customize Simple Poll's templates. You can simply do this by overriding base.html, poll.html and result.html in templates/poll directory.


