Giter Club home page Giter Club logo

django-simple-poll's Introduction

Simple Django poll application.

Installation

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

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'^poll/', include('poll.urls')),
    ]
    
  3. Run python manage.py migrate

  4. Go to site's admin area and create a new poll: 82721122-13db-11e7-905a-b90019b0fbde

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

    {% load poll_tags %}
    ...
    {% poll %}
    
  6. 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, see the results:

2017-03-28 17 17 10 2017-03-28 17 17 05

Customization

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.

django-simple-poll's People

Contributors

applecat avatar vencax avatar luanp avatar seocam avatar dgbc avatar gonzalobustos avatar inlanger avatar

Watchers

James Cloos avatar Siddhant Singh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.