Django project for multiple clients

438 views
Skip to first unread message

Steven Nash

unread,
Mar 26, 2015, 12:23:38 PM3/26/15
to django...@googlegroups.com
We are design a DJango based application to be used my multiple clients.  Each client will have there own database but share the same code base.

In the past, when I've done something like this, I have configure a separate virtual host for each client.

This time we are thinking about using URL routing to select the clients database, and creating a small Django Webapp to allow an admin team to setup new clients etc.

I'd be interested to hear how others have tackled this, I have Googled quite a bit on this topic.

Steve

Simon Charette

unread,
Mar 26, 2015, 1:02:32 PM3/26/15
to django...@googlegroups.com
This concept is called multi-tenancy.

I suggest you have a look at the django-tenant-schema application which isolate each tenant in it's own PostgreSQL schema.

You could also build you own solution using a middleware and a database router.

Simon

Steven Nash

unread,
Mar 26, 2015, 1:13:30 PM3/26/15
to django...@googlegroups.com
This looks like it could be a good solution.

Steve

Gabriel - Iulian Dumbrava

unread,
Mar 27, 2015, 5:37:52 AM3/27/15
to django...@googlegroups.com
If your clients are using different subdomains, like client1.webapp.com, client2.webapp.com then you can have separate settings file per subdomain and completely isolate the client data, but still use the same virtualenv and codebase. You must also take care of the file upload/access because you also need to isolate it.

Benjamin Scherrey

unread,
Mar 31, 2015, 11:43:50 AM3/31/15
to django-users
This is what we've done successfully for multiple projects. Django makes it fairly straightforward.

  -- Ben

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0db98454-b9f4-4ed0-9924-e528d0b11174%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Chief Systems Architect Proteus Technologies
Personal blog where I am not your demographic.

This email intended solely for those who have received it. If you have received this email by accident - well lucky you!!
Reply all
Reply to author
Forward
0 new messages