A django app to help you manage the django-shopify-app package billing
Project description
django-shopify-app-billing
This is a Django app that provides billing for Shopify apps. It is designed to be used with the Django Shopify App package
Installation
pip install django-shopify-app-billing
Add billing
to your INSTALLED_APPS
in your Django settings file.
INSTALLED_APPS = [
...
'shopify_app_billing',
...
]
Add the following to your Shop model:
from shopify_app_billing.models import ShopBilling
from shopify_app.models import ShopBase
class Shop(ShopBase):
...
billing = models.OneToOneField(ShopBilling, on_delete=models.CASCADE, null=True, blank=True)
...
def save(self, *args, **kwargs):
if not self.billing:
self.billing = ShopBilling.objects.create()
super().save(*args, **kwargs)
@property
def plan_activated_redirect_path(self):
return f"/dashboard"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_shopify_app_billing-0.0.6.tar.gz
.
File metadata
- Download URL: django_shopify_app_billing-0.0.6.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffd945078d90c22d6bd0566e96a3b65db81a00241ad385c396f2c115ffc24495 |
|
MD5 | 4b4fae96c09138411d03f45bf0f8ad99 |
|
BLAKE2b-256 | e7e001ab5232589fdda0b9fbd10ef8b749e49139a29405b7e0220d15ab3b0114 |
File details
Details for the file django_shopify_app_billing-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: django_shopify_app_billing-0.0.6-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3568a95edd9f2a0c429a031b04320ad619ef8c24345723d49c3aa56bef67120 |
|
MD5 | b595958ab311a1d229d89e40b85aee80 |
|
BLAKE2b-256 | 4faba27fa899e2ce034d28b861f28347b835fe88544cfab643294a60a3429033 |