Skip to main content

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

django_shopify_app_billing-0.0.6.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django_shopify_app_billing-0.0.6.tar.gz.

File metadata

File hashes

Hashes for django_shopify_app_billing-0.0.6.tar.gz
Algorithm Hash digest
SHA256 ffd945078d90c22d6bd0566e96a3b65db81a00241ad385c396f2c115ffc24495
MD5 4b4fae96c09138411d03f45bf0f8ad99
BLAKE2b-256 e7e001ab5232589fdda0b9fbd10ef8b749e49139a29405b7e0220d15ab3b0114

See more details on using hashes here.

File details

Details for the file django_shopify_app_billing-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for django_shopify_app_billing-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e3568a95edd9f2a0c429a031b04320ad619ef8c24345723d49c3aa56bef67120
MD5 b595958ab311a1d229d89e40b85aee80
BLAKE2b-256 4faba27fa899e2ce034d28b861f28347b835fe88544cfab643294a60a3429033

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page