Git Product home page Git Product logo

building-multi-tenant-applications-with-django's Introduction

building-multi-tenant-applications-with-django's People

Contributors

ezesundayeze avatar jeanbaptistelab avatar shabda avatar yvsssantosh avatar zodman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

building-multi-tenant-applications-with-django's Issues

ModuleNotFoundError: No module named 'tenants'

I did everything that was written inside the tutorial and now I got this error:

  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tenants'

Shared database with isolated schema but no subdomains?

Hi, this is the most complete document about multitenancy on Django I've have seen.

I like the idea of keeping each tenant in a separated schema, specially for performance, but I don't like subdomains specially for three reasons: additional friction during the registration process, extra SLL costs and exposition of my customer list.

Is there a way to have shared database with isolated schema without subdomains?

Keep up the good work!

Docker Compose - Potter Migration Depends on Thor_DB

Looking at the docker-compose file I noticed that potter_migration depends on thor_db.
I'm assuming this is not intentional and it should rather depend on the potter_db?

  potter_db:
    image: postgres
    environment:
      - POSTGRES_PASSWORD=potter
      - POSTGRES_USER=potter
      - POSTGRES_DB=potter
  potter_web:
    image: agiliq/multi-tenant-demo
    command: python3 manage.py runserver 0.0.0.0:8000
    volumes:
      - .:/code
    depends_on:
      - potter_db
    environment:
      - DATABASE_URL=postgres://potter:potter@potter_db/potter

  potter_migration:
    image: agiliq/multi-tenant-demo
    command: python3 manage.py migrate
    volumes:
      - .:/code
    depends_on:
      - thor_db <---- should be potter_db?
    environment:
      - DATABASE_URL=postgres://potter:potter@potter_db/potter

Command "loaddata" isen't work

When I run:

python tenant_context_manage.py <my_schema> loaddata <my_fixture>.json

I recept this message:

"Installed 0 object(s) (of 4) from 1 fixture(s)"

The object is find but not migrate to database.

Add new containers?

The docker compose file has hardcoded containers. How do we add new user containers? Do we just change the docker-compose file through python?

Typo: isolated-db

typo in get_tenants_map function in utils.py line 16

def get_tenants_map():
    return {"thor.polls.local": "thor", "potter.polls.local": "potter"}

Wanted to raise a PR but cannot push a hotfix branch. Return me a 403.

Is it possible to create a schema dynamically using shared database with isolated schema?

Hi,

I am trying to build a multi tenant application by using shared database with isolated schema. I have seen on you read-doc that you have used a function get_tenants_map to keep track of your schema. I would like to know if you have a dynamic solution. Like how should I proceed if I would the user to be able to create his own tenant. What things have to change ?

Thank you very much again for your time guyz!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.