{ "info": { "author": "ayush jain", "author_email": "ayush.jain@consultadd.in", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "=============================\nDRF Votes\n=============================\n\n.. image:: https://badge.fury.io/py/votes.png\n :target: https://badge.fury.io/py/votes\n\n\nDRF Vote is a simple Django Rest Framework app to add ability to like/dislike a model.\n\nBlog\n-------------\n\nYou can read more about it on my blog_\n\n.. _blog: https://medium.com/tixdo-labs/vote-your-model-with-no-pain-9d7670b65bfd#.5q8jkl7xt.\n\nQuickstart\n----------\n\n\nNote\n----------\n User must be logged-in to user user-specific apis.\n\n1. Install votes::\n\n pip install votes\n\n\n\n\n2. Add ``'votes'`` to your ``INSTALLED_APPS`` setting like this::\n\n INSTALLED_APPS = (\n ...\n 'votes',\n )\n\n3. Run ``python manage.py syncdb`` to create the vote models.\n\n\n4. Declare vote field to the model you want to vote::\n\n from votes.managers import VotableManager\n\n class ArticleReview(models.Model):\n ...\n votes = VotableManager()\n\n5. Include votes url to your urls.py file::\n\n from django.conf.urls import include\n from django.conf.urls import url\n\n from votes import urls\n\n urlpatterns += [\n url(r'^', include(urls)),\n ]\n\n=====\nDRF Vote\n=====\n\nThis is extended version of repo django-vote_\n\n.. _django-vote: https://github.com/Beeblio/django-vote\n\nDRF Vote is a simple Django Rest Framework app to add ability to like/dislike a model.\n\nYou can read more about it on my blog post_\n\n.. _post: https://medium.com/@3117Jain/vote-your-model-with-no-pain-9d7670b65bfd#.3zttxekr2\n\n=====\nHow is it different ?\n=====\n\n- Modified to work with django rest framework.\n- A new feature of disliking an object is added in this version.\n\n\nAPIs\n-----------\n\n/votes/up/\n==========\nAdds a new like or dislike vote to the object\n\n* param: model, id, vote i.e. model=movies&id=359&vote=true\n* vote=option[true for up-vote, false for down-vote, None for no-vote]\n\n This api is used for both liking and disliking the object.\n Send\n vote=true for like\n vote=false for dislike\n\n/votes/down/\n==========\nRemoves vote to the object\n\n* param: model, id i.e. model=movies&id=359\n\n/votes/exists/\n============\nCheck if the user already voted the object\n\n* param: model, id i.e. model=movies&id=359\n\n/votes/all/\n=========\nreturn all instances voted by user\n\n* param: model, id i.e. model=movies&id=359\n\n/votes/count/\n=======\nReturns the number of votes for the object\n\n* param: model, id i.e. model=movies&id=359\n\n/votes/users/\n=======\nReturns a list of users who voted and their voting date\n\n* param: model, id i.e. model=movies&id=359\n\n/votes/likes/\n=======\nReturns the number of likes and dislikes for the object.\n\n* param: model, id i.e. model=movies&id=359\n\n\n\nRunning Tests\n--------------\n\nDoes the code actually work?\n\n::\n\n source /bin/activate\n (myenv) $ pip install -r requirements-test.txt\n (myenv) $ python runtests.py\n\nCredits\n---------\n\nTools used in rendering this package:\n\n* Cookiecutter_\n* `cookiecutter-pypackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n\n\n\n\nHistory\n-------\n\n0.1.0 (2016-02-01)\n++++++++++++++++++\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tixdo/votes", "keywords": "votes", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "votes", "package_url": "https://pypi.org/project/votes/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/votes/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tixdo/votes" }, "release_url": "https://pypi.org/project/votes/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "DRF Vote is a simple Django Rest Framework app to add ability to like/dislike a model.", "version": "1.0.1" }, "last_serial": 2048489, "releases": { "0.9.3": [], "0.9.8": [ { "comment_text": "", "digests": { "md5": "74f3889a69692c0a03916c6d5c0e568b", "sha256": "730d08e1b91b7b8c2b03556a9a5b00628a2dcc1b9bcec071eb3203d9eb5aa79d" }, "downloads": -1, "filename": "votes-0.9.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "74f3889a69692c0a03916c6d5c0e568b", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 14174, "upload_time": "2016-04-06T05:13:19", "url": "https://files.pythonhosted.org/packages/ef/68/677df9041863e106a377bff4a391d51cdebb9e4d8daa44542d4f356c00e5/votes-0.9.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4cf7701f0eb4495cd6c1edfc16a8a357", "sha256": "fab07f9872f868e7186d33ceaa50b2f9ee6e8b19a7ae58054d61491840921200" }, "downloads": -1, "filename": "votes-0.9.8.tar.gz", "has_sig": false, "md5_digest": "4cf7701f0eb4495cd6c1edfc16a8a357", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12472, "upload_time": "2016-04-06T05:13:02", "url": "https://files.pythonhosted.org/packages/a3/b2/8a18f3097409ba7ee15e9167a012452a0bebbb14a5f1b815057cb565a4c7/votes-0.9.8.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "07e8eb20bbb0562c5c513dc550f5f5e7", "sha256": "de3c079d7cb8d65c36f2d98c1dd56900899e7ef20e696f72e44493dd766091eb" }, "downloads": -1, "filename": "votes-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "07e8eb20bbb0562c5c513dc550f5f5e7", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 14178, "upload_time": "2016-04-06T05:28:20", "url": "https://files.pythonhosted.org/packages/11/b2/10e363478657662f89f1f12077ee1c38a02e393f47f5aa3864f790d8878d/votes-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "263258a034e3a97948e3bf25ee43705c", "sha256": "09add1ab8a68556db04696da698ef6928d99bc49aa6be1f6a79bf56d07f879bc" }, "downloads": -1, "filename": "votes-1.0.1.tar.gz", "has_sig": false, "md5_digest": "263258a034e3a97948e3bf25ee43705c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12508, "upload_time": "2016-04-06T05:28:06", "url": "https://files.pythonhosted.org/packages/4a/29/ff5077931b2b25b28bd31375f33e0cbaca0c872494ae647a69eebbf32b51/votes-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "07e8eb20bbb0562c5c513dc550f5f5e7", "sha256": "de3c079d7cb8d65c36f2d98c1dd56900899e7ef20e696f72e44493dd766091eb" }, "downloads": -1, "filename": "votes-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "07e8eb20bbb0562c5c513dc550f5f5e7", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 14178, "upload_time": "2016-04-06T05:28:20", "url": "https://files.pythonhosted.org/packages/11/b2/10e363478657662f89f1f12077ee1c38a02e393f47f5aa3864f790d8878d/votes-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "263258a034e3a97948e3bf25ee43705c", "sha256": "09add1ab8a68556db04696da698ef6928d99bc49aa6be1f6a79bf56d07f879bc" }, "downloads": -1, "filename": "votes-1.0.1.tar.gz", "has_sig": false, "md5_digest": "263258a034e3a97948e3bf25ee43705c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12508, "upload_time": "2016-04-06T05:28:06", "url": "https://files.pythonhosted.org/packages/4a/29/ff5077931b2b25b28bd31375f33e0cbaca0c872494ae647a69eebbf32b51/votes-1.0.1.tar.gz" } ] }