Django application for subscription businesses
Project description
djaodjin-saas is a Django application that implements the logic to support subscription-based Software-as-a-Service businesses.
Major Features:
Separate billing profiles and authenticated users
Double entry book keeping ledger
Flexible security framework
Tested with
Python: 2.7, Django: 1.11.23 ([LTS](https://www.djangoproject.com/download/)), Django Rest Framework: 3.9.4
Python: 3.6, Django: 1.11.23 ([LTS](https://www.djangoproject.com/download/)), Django Rest Framework: 3.9.4
Python: 3.6, Django: 2.2.4 (latest, [LTS](https://www.djangoproject.com/download/)), Django Rest Framework: 3.9.4
This project contains bare bone templates which are compatible with Django and Jinja2 template engines. To see djaodjin-saas in action as part of a full-fledged subscription-based session proxy, take a look at [djaoapp](https://github.com/djaodjin/djaoapp/).
Full documentation for the project is available at [Read-the-Docs](http://djaodjin-saas.readthedocs.org/)
Development
After cloning the repository, create a virtualenv environment and install the prerequisites:
- <pre><code>
$ virtualenv <em>installTop</em> $ source <em>installTop</em>/bin/activate $ pip install -r testsite/requirements.txt
</code></pre>
To use the testsite, you will need to add the payment processor keys (see [Processor Backends](http://djaodjin-saas.readthedocs.io/en/latest/backends.html)) and Django secret key into a credentials file. Example with [Stripe](https://stripe.com/):
- <pre><code>
$ cat ./credentials
SECRET_KEY = “<em>enough_random_data</em>” STRIPE_PUB_KEY = “<em>your_stripe_public_api_key</em>” STRIPE_PRIV_KEY = “<em>your_stripe_private_api_key</em>”
</code></pre>
It remains to create the database and populate it with test data.
$ python ./manage.py migrate –run-syncdb –noinput $ python ./manage.py loaddata testsite/fixtures/test_data.json
The test_data.json fixture contains the minimal amount of data to make the testsite usable. If you want to load a bigger set of dummy data, you could run the load_test_transactions command.
$ python ./manage.py load_test_transactions
If all is well then, you are ready to run the server and browse the testsite.
$ python manage.py runserver
# Browse http://localhost:8000/ # Login with username: alice and password: yoyo
Implementation Notes
The latest versions of django-restframework (>=3.0) implement paginators disconnected from parameters in views (i.e. no more paginate_by). You will thus need to define PAGE_SIZE in your settings.py
$ diff testsite/settings.py +REST_FRAMEWORK = { + ‘PAGE_SIZE’: 25, + ‘DEFAULT_PAGINATION_CLASS’: + ‘rest_framework.pagination.PageNumberPagination’, +}
This Django App does not send notification e-mails itself. All major updates that would result in a e-mail sent trigger signals though. It is straightforward to send e-mails on a signal trigger in the main Django project. We provide sample e-mail templates here in the saas/templates/notification/ directory.
Release Notes
- 0.6.2
enables multiple StripeConnect authorize url (live/test)
fixes infinitescroll
fixes connect DELETE method to unsubscribes
[previous release notes](changelog)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file djaodjin-saas-0.6.2.tar.gz.
File metadata
- Download URL: djaodjin-saas-0.6.2.tar.gz
- Upload date:
- Size: 231.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7b3e050ea394cfc2850986b0efc915a6c4acedddea10988252a5f94e0ce1fbd
|
|
| MD5 |
c7bfab235cb3d05a1213a093ab53a019
|
|
| BLAKE2b-256 |
0a7ad33d85c0db88d65e46d248128ffb467b0599aa9d2a6522daf871940ac567
|