{ "info": { "author": "Cory Zue", "author_email": "cory@coryzue.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "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", "Topic :: Software Development :: Libraries" ], "description": "# Simple Affiliate System for Django\n\n\nThis is a very simple library that can be used to provide affiliate links in your django application.\nIt is intentionally very lightweight, allowing your application to do whatever it wants with the data.\n\nThe project is very loosely inspired by the [django-affiliate](https://github.com/st4lk/django-affiliate) library,\nthough seeks to provide a lighter-weight way to provide the core set of functionality without requiring the\nuse of any additional data models.\n\nIf you are looking for a more heavyweight/comprehensive solution you may be better off with\n[django-affiliate](https://github.com/st4lk/django-affiliate).\n\n## How it Works\n\n\nYou give a code to each partner you want to send links to your application.\nThey choose a link that includes their code in an `aid` parameter in the URL. E.g.\n\n`http://example.com/?aid=12345`\n\nThis code is saved in the django session using a middleware, which also adds the id to the request\nas `request.affiliate_id` (note: the ID will also be added if there was no URL param but an id was found\nalready in the session).\n\nThen you can use whatever custom processing logic you want on the `request.affiliate_id` throughout the\nrest of your code.\n\n## Requirements\n\n- python (only tested on 3.5 but should work in 2.7)\n- django (only tested in 1.11 but might work with older versions)\n\n\n## Quick start\n\n1. Install this package to your python distribution\n\n`pip install django-affiliate`\n\n2. Add `'simple_affiliate.middleware.affiliate_middleware'` to `MIDDLEWARE`:\n\n```python\nMIDDLEWARE = (\n # ...\n 'simple_affiliate.middleware.affiliate_middleware',\n)\n```\n\n3. Reward / track affiliate\n\n```python\nif request.affiliate_id and made_some_cash(request):\n pay_affiliate_by_id(request.affiliate_id, dollar_value(request)\n```\n\n## Project Todos\n\n - [] Add / document expiration timeout functionality\n - [] Add tests\n\n\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/czue/django-simple-affiliate", "keywords": "affiliate marketing django middleware tracking", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "django-simple-affiliate", "package_url": "https://pypi.org/project/django-simple-affiliate/", "platform": "", "project_url": "https://pypi.org/project/django-simple-affiliate/", "project_urls": { "Homepage": "https://github.com/czue/django-simple-affiliate" }, "release_url": "https://pypi.org/project/django-simple-affiliate/0.1/", "requires_dist": [ "django" ], "requires_python": "", "summary": "Simple Affiliate System for Django", "version": "0.1" }, "last_serial": 3168025, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "56c696e4e1a3c20272d7edece8562fa1", "sha256": "bf9b636950ac191ce46618399be405a3d279d6dbd9ae490d11950dd12f9c69f0" }, "downloads": -1, "filename": "django_simple_affiliate-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "56c696e4e1a3c20272d7edece8562fa1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5885, "upload_time": "2017-09-12T13:10:12", "url": "https://files.pythonhosted.org/packages/d2/fa/b147b3785ee79193fcc83359338bccc18050dabd03e3f4d3d4b423be485f/django_simple_affiliate-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8ac0c2a4f067e3a9e0484a3d606dc89", "sha256": "29c0c5c796914fa2d5b76addd199dec4c82a951f52d1bc6a7b2e3c61ffdbedbe" }, "downloads": -1, "filename": "django-simple-affiliate-0.1.tar.gz", "has_sig": false, "md5_digest": "d8ac0c2a4f067e3a9e0484a3d606dc89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3067, "upload_time": "2017-09-12T13:10:14", "url": "https://files.pythonhosted.org/packages/60/51/a97796558e44e2e14b5fa1f8425c1e0ccf148e5c11064b233f27c7fb8f3f/django-simple-affiliate-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "56c696e4e1a3c20272d7edece8562fa1", "sha256": "bf9b636950ac191ce46618399be405a3d279d6dbd9ae490d11950dd12f9c69f0" }, "downloads": -1, "filename": "django_simple_affiliate-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "56c696e4e1a3c20272d7edece8562fa1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5885, "upload_time": "2017-09-12T13:10:12", "url": "https://files.pythonhosted.org/packages/d2/fa/b147b3785ee79193fcc83359338bccc18050dabd03e3f4d3d4b423be485f/django_simple_affiliate-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8ac0c2a4f067e3a9e0484a3d606dc89", "sha256": "29c0c5c796914fa2d5b76addd199dec4c82a951f52d1bc6a7b2e3c61ffdbedbe" }, "downloads": -1, "filename": "django-simple-affiliate-0.1.tar.gz", "has_sig": false, "md5_digest": "d8ac0c2a4f067e3a9e0484a3d606dc89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3067, "upload_time": "2017-09-12T13:10:14", "url": "https://files.pythonhosted.org/packages/60/51/a97796558e44e2e14b5fa1f8425c1e0ccf148e5c11064b233f27c7fb8f3f/django-simple-affiliate-0.1.tar.gz" } ] }