Metadata-Version: 1.1
Name: django-vote
Version: 2.0.1
Summary: A simple Django app to conduct vote.
Home-page: https://github.com/Beeblio/django-vote
Author: shellfly
Author-email: shell0fly@gmail.com
License: BSD License
Description: ## Djnago Vote
        
        django vote is a simple Django app to conduct vote for each model
        
        [![Build Status](https://travis-ci.org/shanbay/django-vote.svg?branch=develop)](https://travis-ci.org/shanbay/django-vote)
        
        ### Quick start
        
        #### Install `django-vote` by pip
        
        ```shell
        pip install django-vote
        ```
        
        #### Add `'vote'` to your `INSTALLED_APPS` setting like this
        
        ```python
        INSTALLED_APPS = (
          ...
          'vote',
        )
        ```
        
        #### Run `python manage.py makemigrations vote` to create the vote models.
        
        
        #### Declare vote field to the model you want to vote
        
        ```python
        from vote.managers import VotableManager
        
        class ArticleReview(models.Model):
            ...
            votes = VotableManager()
        ```
        
        #### Use vote API
        
        ```python
        review = ArticleReview.objects.get(pk=1)
        
        # Adds a new vote to the object
        review.votes.up(user_id)
        
        # Removes vote to the object
        review.votes.down(user_id)
        
        # Check if the user already voted the object
        review.votes.exists(user_id)
        
        # Returns all instances voted by user
        Review.votes.all(user_id)
        
        # Returns the number of votes for the object
        review.votes.count()
        
        # Returns a list of users who voted and their voting date
        review.votes.users()
        ```
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
