/flask-paywall

Setup a paywall with Flask and Stripe to offer paid access to your premium content.

Primary LanguagePython

Flask Paywall

Setup a paywall with Flask and Stripe to offer paid access to your premium content.

Workflow

After user register and pays (from the same form), s/he has access to premium content.

QuickStart

Set Environment Variables

Rename config_sample.py to config.py, update the config settings, and then run:

$ export APP_SETTINGS="project.config.DevelopmentConfig"

or

$ export APP_SETTINGS="project.config.ProductionConfig"

Create DB

$ python manage.py create_db
$ python manage.py db init
$ python manage.py db migrate
$ python manage.py create_admin

Run

$ python manage.py runserver

Test

Without coverage:

$ python manage.py test

With coverage:

$ python manage.py cov

Todo

  1. forgot password
  2. change/update password
  3. logging
  4. admin charts
  5. upgrade to python 3/update dependencies
  6. add autoenv