Skip to main content

DjaoDjin-SaaS

Documentation Status PyPI version

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

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.

Full documentation for the project is available at Read-the-Docs

Development

After cloning the repository, create a virtualenv environment and install the prerequisites:


    $ python -m venv .venv
    $ source .venv/bin/activate
    $ pip install -r testsite/requirements.txt

    # Installs Javascript prerequisites to run in the browser
    $ make vendor-assets-prerequisites

To use the testsite, you will need to add the payment processor keys (see Processor Backends) and Django secret key into a credentials file. Example with Stripe:


    $ cat ./credentials

    SECRET_KEY = "enough_random_data"
    STRIPE_PUB_KEY = "your_stripe_public_api_key"
    STRIPE_PRIV_KEY = "your_stripe_private_api_key"

It remains to create and populate the database with required objects.

$ python ./manage.py migrate --run-syncdb --noinput
$ python ./manage.py loaddata testsite/fixtures/initial_data.json
$ python ./manage.py createsuperuser

You can further generate a set of dummy data data to populate the site.

$ python ./manage.py load_test_transactions

Side note: If create your own fixtures file (ex: testsite/fixtures/test_data.json) and attempt to load them with a Django version before 2 while the Python executable was linked with a SQLite version after 3.25, you might stumble upon the well-known SQLite 3.26 breaks database migration ForeignKey constraint, leaving <table_name>__old in db schema bug. Your best bet is to use Django2+ or delete the migrations/ directory.

If all is well then, you are ready to run the server and browse the testsite.

$ python manage.py runserver

# Browse http://localhost:8000/

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

Tested with

  • Python: 3.12, Django: 5.2 (LTS)
  • Python: 3.14, Django: 6.1 (next)
  • Python: 3.10, Django: 4.2 (legacy)
  • Python: 3.9, Django: 3.2 (legacy)

1.3.3

  • fixes security issue in search filter

previous release notes

Metadata

Release files for djaodjin-saas 1.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djaodjin-saas 1.3.4
File Size Uploaded Provenance Actions
djaodjin_saas-1.3.4.tar.gz 332.4 kB Without provenance Details for djaodjin_saas-1.3.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for djaodjin-saas 1.3.4
File Interpreter ABI Platform Actions
djaodjin_saas-1.3.4-py3-none-any.whl Python 3 none any Details for djaodjin_saas-1.3.4-py3-none-any.whl

Total release size: 817.1 kB

Release files / djaodjin_saas-1.3.4.tar.gz

Download URL djaodjin_saas-1.3.4.tar.gz
Size 332.4 kB
Tags Source
SHA-256 checksum
How to use checksums
aaf86ca14bf4b69eb075ccc489b85c8d88444dc3d467cdfb345018139ef76ba6
BLAKE2b-256 checksum
How to use checksums
fd5d087048b0e5204760049a3c51797f18b2525cbba5f9fe71c694fecbff9459
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Release files / djaodjin_saas-1.3.4-py3-none-any.whl

Download URL djaodjin_saas-1.3.4-py3-none-any.whl
Size 484.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17583da4d02dc559f5e96bf18a6600d5d109142bc3d4a134f3efb64618d67a36
BLAKE2b-256 checksum
How to use checksums
a95190002180ffa290b2d5af5e8ad99b2973a877a73afb565a344e4643431f88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Security for djaodjin-saas 1.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page