Skip to content

A simple and easy poll for django. It is an AJAX based Poll system.

License

Notifications You must be signed in to change notification settings

hmtanbir/django-easy-poll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Easy Poll

|Build Status| |Version| |Python| |Size| |Codecov|

Installation

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

Requirements

Django 1.10+, Python 2.7, 3.4+

Usage

  1. Add 'poll' application in the INSTALLED_APPS settings:

    INSTALLED_APPS = (
        ...
        'poll',
    )
    
  2. Add the poll's url to your urls.py.

    urlpatterns = [
        ...        
        url(r'^', include("poll.urls", namespace='poll')),
    ]
    
  3. Run python manage.py migrate poll

  4. Go to site's admin area and create a new poll:

screenshot from 2018-02-20 09-01-26

  1. Add this tags in your template file to show the poll:

    {% load poll_tags %}
    ...
    {% poll %}
    
  2. 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>
  1. Make vote:

screenshot from 2018-02-20 09-03-04

  1. See the results:

screenshot from 2018-02-20 09-06-12

Customization

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.

About

A simple and easy poll for django. It is an AJAX based Poll system.

Resources

License

Stars

Watchers

Forks

Packages

No packages published