{
"info": {
"author": "Brendon Delate",
"author_email": "brendon.delate@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 1 - Planning",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 2.2",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities"
],
"description": "# Django Rave\n\n## Project Description\n\nThis project provides Django integration for [Flutterwave](https://flutterwave.com/) Rave Card payments and subscriptions.\n\nCurrent functionality:\n- Allow users to make payments (once off and subscription)\n- Create payment buttons which launch Rave payment modals\n- Maintain a transaction history linked to users\n\n# Requirements\n\n- Python >= 3.6\n- Django >= 2.0\n\n# Installation\n\n```bash\npip install djangorave\n```\n\n# Setup\n\nAdd `\"djangorave\"` to your `INSTALLED_APPS`\n\nRun Django migrations:\n\n```python\nmanage.py migrate\n```\n\nAdd the following to your `settings.py`:\n\n```python\nRAVE_PRODUCTION_PUBLIC_KEY = \"your key\"\nRAVE_PRODUCTION_SECRET_KEY = \"your key\"\nRAVE_SANDBOX_PUBLIC_KEY = \"your key\"\nRAVE_SANDBOX_SECRET_KEY = \"your key\"\nRAVE_SANDBOX = True\n```\n\nThe above config will ensure `djangorave` uses your Rave sandbox. Once you are\nready to go live, set `RAVE_SANDBOX = False`\n\nAdd `djangorave` to your `urls.py`:\n\n```python\npath(\"djangorave/\", include(\"djangorave.urls\", namespace=\"djangorave\"))\n```\n\nAdd the following url as a webhook in your Rave dashboard. This will be used by\nRave to `POST` payment transactions to your site:\n\n```bash\nhttp://yoursite.com/djangorave/transaction/\n```\n\n`Note:` while in development, a tool like ngrok (or similar) may prove useful.\n\n# Usage\n\n`djangorave` provides two models, namely:\n\n- The `PaymentTypeModel` allows you to create `once off` or `recurring` payment types. When creating a `recurring` payment type, ensure the `payment_plan` field\ncorresponds to the Rave `Plan ID`.\n- The `TransactionModel` creates transactions when Rave POSTS to the above mentioned webhook url. This provides a history of all transactions (once off or recurring), linked to the relevant `PaymentTypeModel` and `user`.\n\nA payment button can be created as follows:\n\n1. Create a new `PaymentType` using the django admin.\n2. In the view where you wish the button to appear, add the above created `PaymentType` to your context, eg:\n\n```python\nfrom djangorave.models import PaymentTypeModel\n\nclass SignUpView(TemplateView):\n \"\"\"Sign Up view\"\"\"\n\n template_name = \"my_payment_template.html\"\n\n def get_context_data(self, **kwargs):\n \"\"\"Add payment type to context data\"\"\"\n kwargs = super().get_context_data(**kwargs)\n kwargs[\"pro_plan\"] = PaymentTypeModel.objects.filter(\n description=\"Pro Plan\"\n ).first()\n return kwargs\n```\n\n3. In your template, add your button wherever you wish for it to appear as follows:\n\n```python\n{% include 'djangorave/pay_button.html' with payment_model=pro_plan %}\n```\n\n`Note:` You can add multiple buttons to a single template by simply adding multiple\nplans to your context data and then including each of them with their own `include`\ntag as above.\n\n4. Add the following script to your django base template (or anywhere in your template heirarchy that ensures it is loaded before your payment buttons):\n\n```html\n\n```\n\n# Button Styling\n\nThe following css classes are available for styling your payment buttons:\n\n- `rave-pay-btn` will apply to all buttons.\n- `rave-subscription-btn` will apply to recurring payment types (ie: those with a `payment_plan`).\n- `rave-onceoff-btn` will apply to once off payment types (ie: those without a `payment_plan`).\n\n# Transaction Detail Page\n\nFollowing a user payment, they will be redirected to the transaction detail page\nlocated at `/djangorave//`\n\nA default transaction detail template is already available, however if you want\nto override it, you may do so by creating a new template in your root\ntemplates directory, ie: `/templates/djangorave/transaction.html`\n\nYou will have access to `{{ transaction }}` within that template.\n\n# Development\n\nIf you wish to contribute to the project, there is an example app that demonstrates\ngeneral usage.\n\n### Running the example:\n\n```bash\ngit clone https://github.com/bdelate/django-rave.git\ncd django-rave\nmake build\nmake migrate\nmake import\nmake dup\n```\n\nThere is a section at the bottom of `django-rave/example/example/settings.py`. Ensure the values are set accordingly:\n\n```python\nRAVE_PRODUCTION_PUBLIC_KEY = \"your key\"\nRAVE_PRODUCTION_SECRET_KEY = \"your key\"\nRAVE_SANDBOX_PUBLIC_KEY = \"your key\"\nRAVE_SANDBOX_SECRET_KEY = \"your key\"\nRAVE_SANDBOX = True\n```\n\nFlutterwave Rave requires payments to be associated with users who have an email address.\nTherefore, create and login with a new django user or use the existing user already\ngenerated following the above import command:\n\n```\nusername: testuser\npassword: secret\n```\n\nNavigate to http://localhost:8000/",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/bdelate/django-rave.git",
"keywords": "flutterwave,rave,django",
"license": "MIT",
"maintainer": "Brendon Delate",
"maintainer_email": "brendon.delate@gmail.com",
"name": "djangorave",
"package_url": "https://pypi.org/project/djangorave/",
"platform": "",
"project_url": "https://pypi.org/project/djangorave/",
"project_urls": {
"Homepage": "https://github.com/bdelate/django-rave.git",
"Repository": "https://github.com/bdelate/django-rave.git"
},
"release_url": "https://pypi.org/project/djangorave/0.1.1/",
"requires_dist": [
"django (>=2.2,<3.0)",
"requests (>=2.22,<3.0)",
"djangorestframework (>=3.10,<4.0)"
],
"requires_python": ">=3.6,<4",
"summary": "Django integration for Flutterwave Rave Card payments and subscriptions",
"version": "0.1.1"
},
"last_serial": 5690591,
"releases": {
"0.0.1": [
{
"comment_text": "",
"digests": {
"md5": "7f22c65b858aa99f945a1617fd8b4b4a",
"sha256": "acf1eb98dbc1377dc065cf696dcf7ba4ec522319aac151a0b48d5e2761b9b566"
},
"downloads": -1,
"filename": "djangorave-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7f22c65b858aa99f945a1617fd8b4b4a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4",
"size": 7460,
"upload_time": "2019-07-31T15:04:48",
"url": "https://files.pythonhosted.org/packages/6c/59/9b3066ac2db2ec5121be8f4972e55a623d2ca798f9d23bd509bb7c3f9b9f/djangorave-0.0.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "f14695d16e0b22992c67991f0a7f9ab3",
"sha256": "7dcaa04e509e2692e5209c980d43b96d9fa30130fdc4b2b9206cf09a4ffdf8c6"
},
"downloads": -1,
"filename": "djangorave-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "f14695d16e0b22992c67991f0a7f9ab3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4",
"size": 5399,
"upload_time": "2019-07-31T15:04:50",
"url": "https://files.pythonhosted.org/packages/e1/f4/d7ebbf1d4d9f3c083a1ba87b4b7272daac1ab50ade8239937b1d8b07c5cd/djangorave-0.0.1.tar.gz"
}
],
"0.0.2": [
{
"comment_text": "",
"digests": {
"md5": "36801eb51248e2813d9d4066c35195dc",
"sha256": "1cfb36a72800324c6769621f3e3cad81507739c5cca244a6bdc89d0e925753df"
},
"downloads": -1,
"filename": "djangorave-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "36801eb51248e2813d9d4066c35195dc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4",
"size": 4349,
"upload_time": "2019-08-01T11:30:05",
"url": "https://files.pythonhosted.org/packages/69/9f/dd8ed0edf46b66bc651395fe85ccccf6ebd169acb5e6380f88e1ed94fe70/djangorave-0.0.2-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "054b71ae1cb12db1e89363e7fbefe056",
"sha256": "96795b345fc64a49e68e46fe5ba980a4cdeed546ebe18b41ffe7017ec4d04c49"
},
"downloads": -1,
"filename": "djangorave-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "054b71ae1cb12db1e89363e7fbefe056",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4",
"size": 3132,
"upload_time": "2019-08-01T11:30:06",
"url": "https://files.pythonhosted.org/packages/b4/11/8b4450e2061466c690ba239ee8791e98b7665740343464afadab749650bd/djangorave-0.0.2.tar.gz"
}
],
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "56818018b13a73ebbb389b7a41f0ef93",
"sha256": "f680e4f01f0c53087c04418b42fdda464677e4e95bab569822d14c079cf3af32"
},
"downloads": -1,
"filename": "djangorave-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "56818018b13a73ebbb389b7a41f0ef93",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4",
"size": 17087,
"upload_time": "2019-08-17T04:17:13",
"url": "https://files.pythonhosted.org/packages/01/73/2c106e2f4fc0d3e4ef745183448e1a064ce0a0e781f8c1d0f2ff8a98341c/djangorave-0.1.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "c3d9861c8ebafc1368ee641556e5cc12",
"sha256": "5b414a208f5992c3d3b07ffadf0d95725cbfa43ba74eacc2a906b8bbc8164f6a"
},
"downloads": -1,
"filename": "djangorave-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "c3d9861c8ebafc1368ee641556e5cc12",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4",
"size": 12886,
"upload_time": "2019-08-17T04:17:15",
"url": "https://files.pythonhosted.org/packages/2c/5f/aab30576b278999a34a4bd091e83e9ddd734d6b930ac517789c503b26302/djangorave-0.1.0.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "9c0cf18c697ec8db9e3b24d9c022239e",
"sha256": "7ecf1d04c0b239d0233f3569d25fa79bcd4ad69fa0f65ba43c3cdabc04dbd1f3"
},
"downloads": -1,
"filename": "djangorave-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9c0cf18c697ec8db9e3b24d9c022239e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4",
"size": 17185,
"upload_time": "2019-08-17T05:12:41",
"url": "https://files.pythonhosted.org/packages/d6/7d/8367a43de276569f126a33fc134a7e8dbfcb1927c4f99d2c864c695abf7d/djangorave-0.1.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "4108ce98b36d1c5adf29a987c117aa72",
"sha256": "6aba12de967c5ac63860c60ce66ccaf55e154d4b49720af512fa81e799b3a37f"
},
"downloads": -1,
"filename": "djangorave-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "4108ce98b36d1c5adf29a987c117aa72",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4",
"size": 13248,
"upload_time": "2019-08-17T05:12:43",
"url": "https://files.pythonhosted.org/packages/f6/8d/72903b7b91b84c3f04af95957011a6612e4139bf35cdea06c4756c377a35/djangorave-0.1.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "9c0cf18c697ec8db9e3b24d9c022239e",
"sha256": "7ecf1d04c0b239d0233f3569d25fa79bcd4ad69fa0f65ba43c3cdabc04dbd1f3"
},
"downloads": -1,
"filename": "djangorave-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9c0cf18c697ec8db9e3b24d9c022239e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4",
"size": 17185,
"upload_time": "2019-08-17T05:12:41",
"url": "https://files.pythonhosted.org/packages/d6/7d/8367a43de276569f126a33fc134a7e8dbfcb1927c4f99d2c864c695abf7d/djangorave-0.1.1-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "4108ce98b36d1c5adf29a987c117aa72",
"sha256": "6aba12de967c5ac63860c60ce66ccaf55e154d4b49720af512fa81e799b3a37f"
},
"downloads": -1,
"filename": "djangorave-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "4108ce98b36d1c5adf29a987c117aa72",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4",
"size": 13248,
"upload_time": "2019-08-17T05:12:43",
"url": "https://files.pythonhosted.org/packages/f6/8d/72903b7b91b84c3f04af95957011a6612e4139bf35cdea06c4756c377a35/djangorave-0.1.1.tar.gz"
}
]
}