Django application that implements shared tenancy
Project description
djaodjin-multitier is a Django application that implements shared tenancy.
Major Features:
- Dynamically select the following based on subdomain or path prefix:
- Database connection
- SMTP connection
- Templates
- URL resolvers: Dynamic path prefix (as a hack in i18n module)
The notes of the presentation at a SF Django Meetup are useful to understand how middlewares, thread locals and template loaders were used to implement multi-tier applications here.
Development
After cloning the repository, create a virtualenv environment, install the prerequisites, create and load initial data into the database, then run the testsite webapp.
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install -r testsite/requirements.txt
# Create the fixtures databases and run the server
$ make initdb
$ python manage.py runserver
Release Notes
Tested with
- Python: 3.7, Django: 3.2 (LTS)
- Python: 3.10, Django: 4.2 (latest)
- Python: 2.7, Django: 1.11 (legacy) - use testsite/requirements-legacy.txt
0.2.1
- hotfix extra field can be None
- replaces field
tag
byextra
to match coding conventions - returns
multitier.Site
whensettings.MULTITIER_SITE_MODEL is None
.
-- Sebastien Mirolo smirolo@djaodjin.com Tue, 10 Oct 2023 14:00:00 -0700
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
djaodjin-multitier-0.2.1.tar.gz
(19.2 kB
view hashes)
Built Distribution
Close
Hashes for djaodjin_multitier-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b97d2efaa9f3d2c64036f1dc133b7128b9f2d854acdb6df24073b0c519764e6b |
|
MD5 | 287f66393b9bab60b26ca001e00ee637 |
|
BLAKE2b-256 | 7ef74fd4e3aad40c5e1be62ab6eb34aa533a01704f772736c859ae91173c30b2 |