I didn't realise there was a "settings" option for syncdb - it works beautifully! I now have multi site with multiple databases and one application installation! Cool...
On Oct 30, 11:29 am, Stodge <sto...@gmail.com> wrote: > Oops - this might be what I need: > > SetEnv DJANGO_SETTINGS_MODULE mysite.other_settings > > So I created my new settings file that points to a different database > and made a new Apache alias to the new virtual Django site that I want > (so /django/fred instead of just /django). But how do I sync this DB? > > On Oct 30, 10:50 am, Stodge <sto...@gmail.com> wrote: > > > Sorry, forgot to say that is with mod_python. > > > On Oct 30, 10:48 am, Stodge <sto...@gmail.com> wrote: > > > > Just wondering whether I could write a middleware that parsed > > > request.path, say: > > > > /django/site1/index > > > > extracted and removed the site name as "site1" and switched the > > > settings on the fly to use settings_site1.py instead. > > > settings_site1.py would use DB named "site1_db". > > > > Then it would process the response to re-insert "site" so that re- > > > directions and links point to the correct site? > > > > So I would have individual sites: > > > > /django/site1/index > > > /django/site2/index > > > /django/site3/index > > > /django/site4/index > > > > Each with its own database but from one codebase. The code doesn't use > > > the Sites framework, which I don't want anyway as I believe it > > > requires a difference application instance per site. I found a multi > > > host middleware via Google but that won't work as my sites are not > > > virtual hosts. Any ideas? > > > > Thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---