Single database with multiple instances of Django

Posted by jwesonga on Stack Overflow See other posts from Stack Overflow or by jwesonga
Published on 2010-03-27T05:40:40Z Indexed on 2010/03/27 5:43 UTC
Read the original article Hit count: 244

I have a Django project where the company will have a main site like www.ourcompany.org and a bunch of sub-domains like project.ourcompany.org. Content appearing in the sub-domains like case studies should also appear in the main site. I've decided to use multiple instances of Django BUT one database for each sub-domain so that I can have some flexibility and take advantage of the Sites framework. What I'm not sure of is how to access the models across the multiple instances. If I have a model:

class CaseStudy(models.Model):
    title=models.CharField(max_length=100)
    site=models.ManyToMany(Site)

Do I need to create this model in every instance so that I can have access to the object?

© Stack Overflow or respective owner

Related posts about django

Related posts about database