|Build Status| |Version| |Python| |Size| |Codecov|
pip install django-easy-poll
Install latest from github:
sudo pip install -e git+https://github.com/hmtanbir/django-easy-poll.git#egg=django-easy-poll
Django 1.10+, Python 2.7, 3.4+
-
Add 'poll' application in the
INSTALLED_APPS
settings:INSTALLED_APPS = ( ... 'poll', )
-
Add the poll's url to your urls.py.
urlpatterns = [ ... url(r'^', include("poll.urls", namespace='poll')), ]
-
Run
python manage.py migrate poll
-
Go to site's admin area and create a new poll:
-
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 Easy Poll's templates. You can easily do this by overriding base.html
, poll.html
and result.html
in templates/poll
directory.