On Wed, 2009-08-05 at 17:59 +0100, Robin Becker wrote: > My boss wants to have two different django controlled websites with a common > database. Is there a way to do this? > > We are already running multiple websites into a single django project and > because they have a disambiguating term in the urls eg each url has > /lang/brand/path.... we can map the URLs pretty well. > > With the multiple django projects & 1 database I am worried there are some > hidden problems waiting to come out and play.
The only potential problem is the content types. There are entries in the content types table for each model and it needs to contain information about all the models. So be careful when you're running syncdb. What you're trying to do here is not dissimilar to just using different settings files for the same database, as in this tip: http://www.pointy-stick.com/blog/2009/03/26/django-tip-controlling-admin-or-other-access/ On the other hand, if the two websites are entirely independent, putting them into a single database is simply poor design. It's trivial to create a separate database and why not use the tools that are available instead of adding extra complexity?! Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---