7WebPages / dj-stripe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dj-stripe

image

image

image

Django + Stripe Made Easy

Documentation

The full documentation is at http://dj-stripe.rtfd.org.

Features

  • Subscription management
  • Designed for easy implementation of post-registration subscription forms
  • Single-unit purchases (forthcoming)
  • Works with Django 1.6, 1.5, 1.4
  • Works with Python 3.3, 2.7, 2.6
  • Works with Bootstrap 3
  • Built-in South migrations
  • Dead-Easy installation
  • Leverages in the best of the 3rd party Django package ecosystem
  • djstripe namespace so you can have more than one payments related app
  • Documented (Making good progress)
  • Tested (Making good progress)

Constraints

  1. For stripe.com only
  2. Only use or support well-maintained third-party libraries
  3. For modern Python and Django

Quickstart

Install dj-stripe:

Add djstripe to your INSTALLED_APPS:

Add the context processor to your TEMPLATE_CONTEXT_PROCESSORS:

Add your stripe keys:

Add some payment plans:

Add to the urls.py:

Run the commands:

python manage.py syncdb

python manage.py migrate  # if you are using South

python manage.py djstripe_init_customers

python manage.py djstripe_init_plans

If you haven't already, add JQuery and the Bootstrap 3.0.0 JS and CSS to your base template:

Also, if you don't have it already, add a javascript block to your base.html file:

Start up the webserver:

Running the Tests

Assuming the tests are run against PostgreSQL:

createdb djstripe
pip install -r requirements_test.txt
coverage run --source djstripe runtests.py
coverage report -m

Follows Best Practices

Two Scoops of Django

This project follows best practices as espoused in Two Scoops of Django: Best Practices for Django 1.6.

Similar Projects

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 82.3%Language:HTML 15.1%Language:CSS 2.4%Language:JavaScript 0.2%Language:Makefile 0.1%