I appreciate the feedback.  I'll take a peek at the multi-db branch.
If anyone is using it and can give a indication of the state, I'm
interested.

Our site is organized exactly as you mention in 1) and it looks like
that's the route we'll be going.

So looks like there is no easy answer to my dynamic db settings.  I'd
be interested in the complex answer if anyone has one.  Specifically
for the command line tool we have.  Editing the settings.py with a sed
script seems so crude.

Thanks,

-Brian

On 10/12/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
> On 10/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Now my question.  Is there an easy way to change the database settings
> > dynamically?  Ideally I'd like to parse the url and call a view
> > function with the appropriate database settings.  This would allow us
> > to host one webapp for both DB's.
>
> Easily? - not really - at least, not within a single deployed Django instance.
>
> As I see it, you have two options:
>
> 1) Deploy multiple Django instances (one for each database you want to
> support), and use your Apache setup to direct specific URLs to
> specific Django instances. If your application can be easily split at
> a root URL level (e.g., all URLs under http://site/foo goes to
> database 1, all URLs under http://site/bar go to database 2), this may
> be the easiest way to solve your problem.
>
> 2) Look at the multi-db branch. It's a development branch of Django
> aimed at supporting multiple database backends in a single Django
> project. I haven't used it myself, so I can't comment on the stability
> or suitability of the features in this branch, but it might be worth a
> look..
>
> Yours,
> Russ Magee %-)
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to