Re: Multiple sites, multiple databases, one Django installation? Middleware?
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home