After the app is installed, you can start creating subscriptions!
The app is designed to work with the following flow:
If you want to make your site subscription only you can set the SPREEDLY_USERS_ONLY to True. This will redirect any anonymous user (or user with an inactive subscription) who visits a page not in the SPREEDLY_ALLOWED_PATHS list to your SPREEDLY_URL
Spreedly is sent a redirect url that will check and see if the user has signed up and activate their account. A user may not click on this link and in that case their account won’t be active, unless:
Spreedly will ping a url with subscriptions change, and django-spreedly is setup to listen for this.
in your spreedly setting is the following: ‘Subscribers Changed Notification URL’
if you changed SPREEDLY_URL, you’ll need to substitute that for subscriptions.
If you want to add a fallback, you can also add the following to your login view after a user is logged in (but before you check if they are active):
from spreedly.functions import get_subscription
- if not user.is_active:
- get_subscription(user)