Its not documented, you need to checkout the source code here:
from djstripe.models import Plan
for plan in Plan.api_list():
Plan.sync_from_stripe_data(plan)
$ python manage.py djstripe_init_customers
- djstripe_init_customers - """Create customer objects for existing subscribers that don't have one."""
- djstripe_sync_customers - """Sync subscriber data with stripe."""
- djstripe_clear_expired_idempotency_keys - "Deleted expired Stripe idempotency keys."
def subscriber_has_active_subscription(subscriber, plan=None):
class SubscriptionPaymentMiddleware(MiddlewareMixin):
"""
Used to redirect users from subcription-locked request destinations.
Rules:
* "(app_name)" means everything from this app is exempt
* "[namespace]" means everything with this name is exempt
* "namespace:name" means this namespaced URL is exempt
* "name" means this URL is exempt
* The entire djstripe namespace is exempt
* If settings.DEBUG is True, then django-debug-toolbar is exempt
* A 'fn:' prefix means the rest of the URL is fnmatch'd.
Example::
DJSTRIPE_SUBSCRIPTION_REQUIRED_EXCEPTION_URLS = (
"[blogs]", # Anything in the blogs namespace
"products:detail", # A ProductDetail view you want shown to non-payers
"home", # Site homepage
"fn:/accounts*", # anything in the accounts/ URL path
)
"""
- subscriber_passes_pay_test - Decorator for views that checks the subscriber passes the given test for a "Paid Feature"
- subscription_payment_required - Decorator for views that require subscription payment. Redirects to
pay_page
if necessary.
Links