Implement multi-tenancy in Django using the django-tenants & django-tenant-users package.
Find a file
2025-06-27 14:34:51 +02:00
blog simplified URLs and index_view() 2025-05-08 15:40:38 +02:00
core clean up 2025-05-11 17:22:27 +02:00
tasks recreate the DB + migrate in populate_db 2025-05-11 10:20:21 +02:00
tenants clean up 2025-05-11 17:22:27 +02:00
.gitignore project init 2025-05-08 11:33:41 +02:00
manage.py project init 2025-05-08 11:33:41 +02:00
README.md Update README.md 2025-06-27 14:34:51 +02:00
requirements.txt django-tenant-users, updated the models + populate_db command 2025-05-11 09:56:20 +02:00

Building a Multi-tenant App with Django

Want to learn how to build this?

Check out the post.

Want to use this project?

  1. Fork/Clone

  2. Spin up a PostgreSQL database using Docker:

    $ docker run --name sprinty-postgres -p 5432:5432 \
        -e POSTGRES_USER=sprinty -e POSTGRES_PASSWORD=complexpassword123 \
        -e POSTGRES_DB=sprinty -d postgres
    
  3. Populate the database:

    $ python manage.py populate_db
    
  4. Your tenants should be accessible at the following URLs:

  5. Tenant information including admin credentials, can be found in tenants.json file.