{ "info": { "author": "shiprashalini", "author_email": "code.shipra@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4" ], "description": "# django-mongo-coupons\n\n\n\n\nA mongoengine implementaion of [django-coupons](https://github.com/byteweaver/django-coupons \"Django-coupons\"), A reuseable Django application for coupon gereration and handling.\n\nIs not compatible with relational db Auth User\n\n\n## Setup instructions\n\n1. Install `django-mongo-coupons` via pip:\n ```\n $ pip install django-mongo-coupons\n ```\n\n2. Add `'mongo_coupons'` to `INSTALLED_APPS` in `settings.py`.\n\n\n ```Python\n INSTALLED_APPS = [\n ...\n 'mongoengine'\n 'rest_framework_mongoengine',\n 'mongo_coupons'\n ...\n ]\n ```\n\n3. Include `mongo_coupons.urls` in urls.py\n ```Python\n urlpatterns += [ url(r'^coupons/', include(coupon_urls)) ]\n ```\n\n## Dependencies\n* [mongoengine]('http://mongoengine.org/')\n* [django-rest-framework]('http://www.django-rest-framework.org/')\n* [django-rest-framework-mongoengine]('https://github.com/umutbozkurt/django-rest-framework-mongoengine.git')\n* [django-mongoengine]('https://github.com/MongoEngine/django-mongoengine.git') # unstable project, needed if`AUTH_USER_MODEL` is not defined.\n\n## Supported use cases of coupons\n\nSupports all coupons supported by [django-coupons](https://github.com/byteweaver/django-coupons \"Django-coupons\") and few more:\n\n * single time (default): coupon can be used one time without being bound to an user.\n * user limited: coupon can be used one time but only by a specific user.\n * limit number: coupon can be used a limited number of times, by any user once.\n * users list: coupon can be used by a defined list of users, each once.\n * unlimited: coupon can be used unlimited times, but only once by the same user.\n * usage limited: type of coupon can be any of the above but can be used only n times\n\n\n## Example\n\n###### Request\n\n $ curl 'http://localhost:8000/coupons/coupons/'\\\n -H 'Accept: application/json; indent=4'\\\n -H 'Content-Type: application/json'\\\n -X POST -d '{\n \"value\": 50,\n \"code\": \"\",\n \"type\": \"percentage\",\n \"user_limit\": 3,\n \"campaign\": \"5857afaf86a5c70681a5b783\",\n \"max_discount\": \"500\"\n }'\n\n * campain: _id of the campain\n\n###### Response\n\n {\n \"id\": \"58590b3d86a5c770e85db279\",\n \"value\": 50,\n \"code\": \"KijWCoTI8xUI7tc\",\n \"max_discount\": 500,\n \"type\": \"percentage\",\n \"user_limit\": 3,\n \"usage_limit\": 1,\n \"created_at\": \"2016-12-20T10:42:25.701545\",\n \"valid_until\": null,\n \"kwargs\": null,\n \"campaign\": \"5857afaf86a5c70681a5b783\"\n }", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ShipraShalini/django_mongo_coupons.git", "keywords": "django mongo coupons", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-mongo-coupons", "package_url": "https://pypi.org/project/django-mongo-coupons/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-mongo-coupons/", "project_urls": { "Homepage": "https://github.com/ShipraShalini/django_mongo_coupons.git" }, "release_url": "https://pypi.org/project/django-mongo-coupons/0.0.1b1/", "requires_dist": null, "requires_python": "", "summary": "Django-coupons with mongoengine", "version": "0.0.1b1" }, "last_serial": 2530195, "releases": { "0.0.1.dev1": [ { "comment_text": "", "digests": { "md5": "ad9d0c739d1a571e9db2a4e598843967", "sha256": "4a781db94fa72140058bf19189930243e8bf3d88c641570e370996dedeab5e8b" }, "downloads": -1, "filename": "django-mongo-coupons-0.0.1.dev1.tar.gz", "has_sig": false, "md5_digest": "ad9d0c739d1a571e9db2a4e598843967", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8292, "upload_time": "2016-12-19T13:52:02", "url": "https://files.pythonhosted.org/packages/a8/84/6ab1d48744c44769993ff229cf15a65e0efcc936500a83c3beb378a0fa64/django-mongo-coupons-0.0.1.dev1.tar.gz" } ], "0.0.1.dev2": [ { "comment_text": "", "digests": { "md5": "3ed1bde6c604b1d6738fffec0d4ff995", "sha256": "d4e8edf5c1e945e2cfba906b1c07e65db20d2fb8dafe098a30ec5ab1a7cc1f42" }, "downloads": -1, "filename": "django_mongo_coupons-0.0.1.dev2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3ed1bde6c604b1d6738fffec0d4ff995", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12450, "upload_time": "2016-12-20T10:09:47", "url": "https://files.pythonhosted.org/packages/89/f8/6eb923c425b84926c7d9af0a199265329d8280eacba021c6df2f54b14cc0/django_mongo_coupons-0.0.1.dev2-py2.py3-none-any.whl" } ], "0.0.1b1": [ { "comment_text": "", "digests": { "md5": "e74099d4d4df3f45546c00631f4f9908", "sha256": "01ff5281817dc1a0b36fea4baf023945c60301183bdebaff7afcdb7334cdfaa0" }, "downloads": -1, "filename": "django_mongo_coupons-0.0.1b1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e74099d4d4df3f45546c00631f4f9908", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13125, "upload_time": "2016-12-20T11:52:28", "url": "https://files.pythonhosted.org/packages/cd/2c/e846f9b9461f1544867557c7c7f29b0b400cfab90b6955cc5992af139d9e/django_mongo_coupons-0.0.1b1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e418eeb78bb11de1c1ee7b1607949705", "sha256": "1f55410b84a629d62d11cf199e9d4fdd2e3e0141b22cbf4274edc700e1f0efe0" }, "downloads": -1, "filename": "django-mongo-coupons-0.0.1b1.tar.gz", "has_sig": false, "md5_digest": "e418eeb78bb11de1c1ee7b1607949705", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7782, "upload_time": "2016-12-20T11:52:30", "url": "https://files.pythonhosted.org/packages/50/79/2689069fa4fbf2b48e65afd34e05825f9fcfb4175439b3599ff2b351027d/django-mongo-coupons-0.0.1b1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e74099d4d4df3f45546c00631f4f9908", "sha256": "01ff5281817dc1a0b36fea4baf023945c60301183bdebaff7afcdb7334cdfaa0" }, "downloads": -1, "filename": "django_mongo_coupons-0.0.1b1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e74099d4d4df3f45546c00631f4f9908", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13125, "upload_time": "2016-12-20T11:52:28", "url": "https://files.pythonhosted.org/packages/cd/2c/e846f9b9461f1544867557c7c7f29b0b400cfab90b6955cc5992af139d9e/django_mongo_coupons-0.0.1b1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e418eeb78bb11de1c1ee7b1607949705", "sha256": "1f55410b84a629d62d11cf199e9d4fdd2e3e0141b22cbf4274edc700e1f0efe0" }, "downloads": -1, "filename": "django-mongo-coupons-0.0.1b1.tar.gz", "has_sig": false, "md5_digest": "e418eeb78bb11de1c1ee7b1607949705", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7782, "upload_time": "2016-12-20T11:52:30", "url": "https://files.pythonhosted.org/packages/50/79/2689069fa4fbf2b48e65afd34e05825f9fcfb4175439b3599ff2b351027d/django-mongo-coupons-0.0.1b1.tar.gz" } ] }