There are two main ways to do multi-tenacy with Django sites.

With separate Divio Cloud projects

This method involves separate Django instances, one for each site. It's generally a straightforward solution because it avoids some issues with caching at import time.

However, while it's possible with the Divio Cloud, it's currently rather cumbersome to implement. You'd have to make a project for each site on Divio Cloud and then contact us. We could then make them all use the same database and storage backend.

Because of this setup, you have to remember to push your code changes to all sites and to deploy them all when you make changes.

Django Multisite

A more elegant and cost-effective approach is Django Multisite. With this approach, one Python process handles traffic for all sites and switches between them based on the Host header. 

For users of django CMS, django CMS Multisite is a useful component in this endeavour. 

Be aware that with the default setup of Django Multisite and django CMS Multisite you'll get a 404 if the domain does not match an entry in django.contrib.sites, so your configuration will need to be managed carefully.

Did this answer your question?