Re: Accessing multiple databases from a single django app?

2010-11-28 Thread girish shabadimath
database router is the solution, check this out
http://docs.djangoproject.com/en/1.2/topics/db/multi-db/#database-routers


On Sat, Nov 27, 2010 at 12:34 AM, Tom Evans wrote:

> On Fri, Nov 26, 2010 at 5:28 PM, Roy Smith  wrote:
> > I want my application to be able to access two different mysql
> > databases (with different credentials, running on two different
> > servers).  One is a large data collection which I'll be accessing read-
> > only.  The other is read-write, and will be the one which manages the
> > site (account creation, user preferences, etc).  Is there a way to do
> > this?
> >
>
> http://docs.djangoproject.com/en/1.2/topics/db/multi-db/ ?
>
> HTH
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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.
>
>


-- 
Girish M S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Re: Accessing multiple databases from a single django app?

2010-11-26 Thread Tom Evans
On Fri, Nov 26, 2010 at 5:28 PM, Roy Smith  wrote:
> I want my application to be able to access two different mysql
> databases (with different credentials, running on two different
> servers).  One is a large data collection which I'll be accessing read-
> only.  The other is read-write, and will be the one which manages the
> site (account creation, user preferences, etc).  Is there a way to do
> this?
>

http://docs.djangoproject.com/en/1.2/topics/db/multi-db/ ?

HTH

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Accessing multiple databases from a single django app?

2010-11-26 Thread Roy Smith
I want my application to be able to access two different mysql
databases (with different credentials, running on two different
servers).  One is a large data collection which I'll be accessing read-
only.  The other is read-write, and will be the one which manages the
site (account creation, user preferences, etc).  Is there a way to do
this?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Re: Accessing Multiple Databases.

2008-12-16 Thread Tom Eastman

Malcolm Tredinnick wrote:

> In hindsight, I probably wasn't clear as to why I'm suggesting this:
> there are a lot of places where Django would like to write to your
> database (sessions, auth lookups, ...). You can configure around and
> away from each of those in turn, but, if this were me, I'd save on brain
> wear-and-tear by letting Django behave normally until and unless I
> wanted to talk to this other read-only database and then I'd explicitly
> point my database connection in that direction. I have no stronger
> technical reason for my suggestion than that; it's primarily intuition
> and gut-feeling, but you don't have to tell anybody that.

Thanks Malcolm,  that vague use-case was pretty much what I was thinking 
too, I'll read through the article and see what insights it has :-)

Cheers!

Tom


-- 
Tom Eastman / +64 3 479 7073 / tom.east...@stonebow.otago.ac.nz


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Accessing Multiple Databases.

2008-12-15 Thread Malcolm Tredinnick


On Tue, 2008-12-16 at 14:28 +1100, Malcolm Tredinnick wrote:
> 
> On Tue, 2008-12-16 at 15:25 +1300, Tom Eastman wrote:
> > Hey Guys,
> > 
> > I'm about to start developing a web front-end for a large database being 
> > developed by a colleague.  The web front-end is only going to be 
> > accessing a sub-set of the database, and mostly via 'views' that will be 
> > specific to the requirements of the web frontend.
> > 
> > I want to use Django, since I'm vaguely familiar with it (and it rocks). 
> > But what I want to do is have one database for all the django-specific 
> > stuff, so that I don't have to create any django-specific tables in the 
> > main database.
> > 
> > Can anyone point me in the direction of achieving this?  Will I still be 
> > able to take advantage of Django's database API or will I end up having 
> > to drop to raw SQL a lot more?
> 
> You'll probably want to set things up so that the "natural" database is
> your Django-specific one and then accesses to the other database is done
> via a custom manager.

In hindsight, I probably wasn't clear as to why I'm suggesting this:
there are a lot of places where Django would like to write to your
database (sessions, auth lookups, ...). You can configure around and
away from each of those in turn, but, if this were me, I'd save on brain
wear-and-tear by letting Django behave normally until and unless I
wanted to talk to this other read-only database and then I'd explicitly
point my database connection in that direction. I have no stronger
technical reason for my suggestion than that; it's primarily intuition
and gut-feeling, but you don't have to tell anybody that.

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
-~--~~~~--~~--~--~---



Re: Accessing Multiple Databases.

2008-12-15 Thread Malcolm Tredinnick


On Tue, 2008-12-16 at 15:25 +1300, Tom Eastman wrote:
> Hey Guys,
> 
> I'm about to start developing a web front-end for a large database being 
> developed by a colleague.  The web front-end is only going to be 
> accessing a sub-set of the database, and mostly via 'views' that will be 
> specific to the requirements of the web frontend.
> 
> I want to use Django, since I'm vaguely familiar with it (and it rocks). 
> But what I want to do is have one database for all the django-specific 
> stuff, so that I don't have to create any django-specific tables in the 
> main database.
> 
> Can anyone point me in the direction of achieving this?  Will I still be 
> able to take advantage of Django's database API or will I end up having 
> to drop to raw SQL a lot more?

You'll probably want to set things up so that the "natural" database is
your Django-specific one and then accesses to the other database is done
via a custom manager.

There are a few blog posts around about accessing multiple databases in
ways that work reliably, until such time as Django ships with it by
default. I'll just point you to this one, since I had the link to hand: 
http://www.mechanicalgirl.com/view/multiple-database-connection-a-simple-use-case/

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
-~--~~~~--~~--~--~---



Accessing Multiple Databases.

2008-12-15 Thread Tom Eastman

Hey Guys,

I'm about to start developing a web front-end for a large database being 
developed by a colleague.  The web front-end is only going to be 
accessing a sub-set of the database, and mostly via 'views' that will be 
specific to the requirements of the web frontend.

I want to use Django, since I'm vaguely familiar with it (and it rocks). 
But what I want to do is have one database for all the django-specific 
stuff, so that I don't have to create any django-specific tables in the 
main database.

Can anyone point me in the direction of achieving this?  Will I still be 
able to take advantage of Django's database API or will I end up having 
to drop to raw SQL a lot more?

I'm just kind of testing the waters at the moment.  Anyone have any 
experience in similar situations?

Thanks!!

 Tom


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Accessing Multiple Databases

2008-12-15 Thread Tom Eastman

Hey Guys,

I'm about to start developing a web front-end for a large database being 
developed by a colleague.  The web front-end is only going to be 
accessing a sub-set of the database, and mostly via 'views' that will be 
specific to the requirements of the web frontend.

I want to use Django, since I'm vaguely familiar with it (and it rocks). 
But what I want to do is have one database for all the django-specific 
stuff, so that I don't have to create any django-specific tables in the 
main database.

Can anyone point me in the direction of achieving this?  Will I still be 
able to take advantage of Django's database API or will I end up having 
to drop to raw SQL a lot more?

I'm just kind of testing the waters at the moment.  Anyone have any 
experience in similar situations?

Thanks!!

 Tom


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Accessing multiple databases

2008-04-15 Thread [EMAIL PROTECTED]

I've been using the multi db branch of Django successfully for three
years on one of my projects...works great

On Apr 15, 8:03 pm, RaviKondamuru <[EMAIL PROTECTED]> wrote:
> Hi,
> I am intending to use two different databases. Essentially retrieve
> some data from a remote database and have some data in the local
> database. Is such configuration supported in Django? Any pointers to
> such configuration possibility?
> thanks,
> Ravi.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Accessing multiple databases

2008-04-15 Thread Daryl Spitzer

I'm working on ticket #1142
(http://code.djangoproject.com/ticket/1142): "Support for multiple
database connections."  I'm putting together on a prototype which I'll
attach to the ticket (as a patch with some rough documentation) that
you could test.  I'm going to be careful not to promise when it will
be available--I'm very busy.  But I hope to resume working on it very
soon.

If anyone else knows another way to do this right now, I'd sure love
to hear about it.

--
Daryl


On Tue, Apr 15, 2008 at 5:03 PM, RaviKondamuru <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>  I am intending to use two different databases. Essentially retrieve
>  some data from a remote database and have some data in the local
>  database. Is such configuration supported in Django? Any pointers to
>  such configuration possibility?
>  thanks,
>  Ravi.
>  >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Accessing multiple databases

2008-04-15 Thread RaviKondamuru

Hi,
I am intending to use two different databases. Essentially retrieve
some data from a remote database and have some data in the local
database. Is such configuration supported in Django? Any pointers to
such configuration possibility?
thanks,
Ravi.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Accessing Multiple Databases

2007-12-29 Thread hedronist


On Dec 13, 10:54 am, birkin <[EMAIL PROTECTED]> wrote:
> For one of my projects I import data from a non-django-controlled
> database using the MySQLdb python library, populate adjangomodel
> object and save it (to my app's django-controlled database table).
> Works smoothly.

I did something similar to import product data from an osCommerce
database into Django-space.

Although this solved our immediate problem, it created new ones of its
own.

1. If the table is read-only (which it was in our case), then how do
you know when to refresh it from the master? Since changes to the
master were relatively infrequent, our solution was to have a cron job
do this each night + a manual push-the-button page in Django where the
store admin can force it. Inelegant, but functional.

2. If the table is read-write, now you've got problems. You have the
refresh-from-the-other-DB problem in #1 plus you need to intercept all
save() operations to your Django table and duplicate it on the other
system. And don't even think about any kind of ACID promises. Yuck!

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Accessing Multiple Databases

2007-12-13 Thread birkin

Derek,

> ...If not, what should I be doing?

For one of my projects I import data from a non-django-controlled
database using the MySQLdb python library, populate a django model
object and save it (to my app's django-controlled database table).
Works smoothly.

http://sourceforge.net/projects/mysql-python

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65235

-Birkin
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Accessing Multiple Databases

2007-12-12 Thread Ben Ford
Hi folks,

I was going to keep quiet on this until I was a bit further along... I've
just started work on re-hashing multiple-db support to make it a bit more
flexible. The existing code is quite hard to update with trunk as it makes a
lot of changes to django's core codebase. I've also found it a little hard
to work with in some more complicated contexts. (I'm not knocking it at all,
it just doesn't quite do it for me). So in the spirit of "scratch your own
itch" I'm going to have a play with it.

I wasn't going to mention it until I was further along, for two reasons: One
that I didn't want to add more noise to this topic - it seems to rear it's
head all on it's own fairly regularly! Two, I'm not really sure how much
time I can commit to this - I'm just on my way back to the UK after an
absence of nearly 2.5 years so I have a lot of catching up to do!! I will
however do my best and will update with my progress (and some docs) at some
usable point in the future.

Cheers,
Ben

On 13/12/2007, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
>
> On Dec 13, 2007 12:25 AM, Derek Steinkamp <[EMAIL PROTECTED]> wrote:
> >
> > As an aside, I think it is a real showstopper to not include this
> > feature in the main trunk... I can't believe the triage stage on the
> > feature request was recently changed to "Someday/Maybe". To me it seems
> > obvious that all of the data that a Django app could need might not
> > reside on the same database for any number of reasons.
>
> It may well be a real showstopper - for you. Is it a showstopper for
> everyone? Not even close. To date, I have never had a need for
> multi-db support. There are a large number of Django sites out there
> that are successfully deployed without support for multi-db.
>
> If multi-db were to magically materialize in the Django source tree,
> would it be a valuable addition? Yes, certainly. Hence, the
> "Someday/Maybe" tag.
>
> The "Someday/Maybe" tag is an indication that we (that is, the core
> developers) are not opposed to introducing this feature, but it's not
> on our immediate to-do list. At the moment, the big issues consuming
> our time are things like:
> * Completing the transition to newforms, thereby resolving the issues
> with edit_inline and core=True
> * Refactoring the query engine to resolve the myriad known issues with
> order_by, select_related, and table joins
>
> Whereas multi-db is of interest to _some_ users, edit_inline and join
> issues affect virtually _all_ users. Developer time is limited, so we
> have to prioritize, and the issues that will be addressed first are
> those that:
>
> 1) affect the most people.
> 2) affect the core developers personally.
>
> Using this scheme, multi-db falls quite some way down the to-do list.
>
> > Perhaps I'll put some work into this when I have some time and get it
> > caught up with the latest trunk.
>
> If multi-db support is important to you, then this is the most helpful
> thing you can do.
>
> Yours,
> Russ Magee %-)
>
> >
>


-- 
Regards,
Ben Ford
[EMAIL PROTECTED]
+6281317958862

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Accessing Multiple Databases

2007-12-12 Thread Russell Keith-Magee

On Dec 13, 2007 12:25 AM, Derek Steinkamp <[EMAIL PROTECTED]> wrote:
>
> As an aside, I think it is a real showstopper to not include this
> feature in the main trunk... I can't believe the triage stage on the
> feature request was recently changed to "Someday/Maybe". To me it seems
> obvious that all of the data that a Django app could need might not
> reside on the same database for any number of reasons.

It may well be a real showstopper - for you. Is it a showstopper for
everyone? Not even close. To date, I have never had a need for
multi-db support. There are a large number of Django sites out there
that are successfully deployed without support for multi-db.

If multi-db were to magically materialize in the Django source tree,
would it be a valuable addition? Yes, certainly. Hence, the
"Someday/Maybe" tag.

The "Someday/Maybe" tag is an indication that we (that is, the core
developers) are not opposed to introducing this feature, but it's not
on our immediate to-do list. At the moment, the big issues consuming
our time are things like:
* Completing the transition to newforms, thereby resolving the issues
with edit_inline and core=True
* Refactoring the query engine to resolve the myriad known issues with
order_by, select_related, and table joins

Whereas multi-db is of interest to _some_ users, edit_inline and join
issues affect virtually _all_ users. Developer time is limited, so we
have to prioritize, and the issues that will be addressed first are
those that:

1) affect the most people.
2) affect the core developers personally.

Using this scheme, multi-db falls quite some way down the to-do list.

> Perhaps I'll put some work into this when I have some time and get it
> caught up with the latest trunk.

If multi-db support is important to you, then this is the most helpful
thing you can do.

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
-~--~~~~--~~--~--~---



Re: Accessing Multiple Databases

2007-12-12 Thread koenb

Please also have a look at ticket #4747. It was/is an effort to bring
multi db a little bit closer to trunk. Regrettably, I have not had the
time (nor the need) to continue working on this.
Good luck.

Koen

On 12 dec, 16:25, Derek Steinkamp <[EMAIL PROTECTED]> wrote:
> Thanks for the link, it is very helpful. I see the last attachments are
> the docs committed by you -- I'll be giving those a read here shortly.
>
> As an aside, I think it is a real showstopper to not include this
> feature in the main trunk... I can't believe the triage stage on the
> feature request was recently changed to "Someday/Maybe". To me it seems
> obvious that all of the data that a Django app could need might not
> reside on the same database for any number of reasons.
>
> Perhaps I'll put some work into this when I have some time and get it
> caught up with the latest trunk.
>
> Derek
>
> [EMAIL PROTECTED] wrote:
> > There is a Multiple Database Branch which is not under active
> > development...and doesn't have some of the new stuff in the
> > trunk...but I'm using it in one of my projects...works pretty good for
> > the most part.
>
> >http://code.djangoproject.com/wiki/MultipleDatabaseSupport
>
> > On Dec 11, 2:48 pm, Derek Steinkamp <[EMAIL PROTECTED]> wrote:
>
> >> I read through all the relevant documentation but I couldn't find any
> >> info on an issue I am about to face: accessing multiple tables in
> >> different databases with Django.
>
> >> Here's a quick example:
> >> My Django app (MyApp) has r/w access to the MyApp database on
> >> MySQLserver1, and all of MyApp models live within here. I now need to
> >> access a pre-existing database/table on MySQLserver2 to bring in some
> >> data relevant to MyApp.
>
> >> My ultimate question is: does Django support accessing models that live
> >> in/on different databases/servers within one app? If so, how do I do
> >> this? If not, what should I be doing?
>
> >> Thanks,
> >> Derek
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Accessing Multiple Databases

2007-12-12 Thread Derek Steinkamp

Thanks for the link, it is very helpful. I see the last attachments are 
the docs committed by you -- I'll be giving those a read here shortly.

As an aside, I think it is a real showstopper to not include this 
feature in the main trunk... I can't believe the triage stage on the 
feature request was recently changed to "Someday/Maybe". To me it seems 
obvious that all of the data that a Django app could need might not 
reside on the same database for any number of reasons.

Perhaps I'll put some work into this when I have some time and get it 
caught up with the latest trunk.

Derek


[EMAIL PROTECTED] wrote:
> There is a Multiple Database Branch which is not under active
> development...and doesn't have some of the new stuff in the
> trunk...but I'm using it in one of my projects...works pretty good for
> the most part.
>
> http://code.djangoproject.com/wiki/MultipleDatabaseSupport
>
> On Dec 11, 2:48 pm, Derek Steinkamp <[EMAIL PROTECTED]> wrote:
>   
>> I read through all the relevant documentation but I couldn't find any
>> info on an issue I am about to face: accessing multiple tables in
>> different databases with Django.
>>
>> Here's a quick example:
>> My Django app (MyApp) has r/w access to the MyApp database on
>> MySQLserver1, and all of MyApp models live within here. I now need to
>> access a pre-existing database/table on MySQLserver2 to bring in some
>> data relevant to MyApp.
>>
>> My ultimate question is: does Django support accessing models that live
>> in/on different databases/servers within one app? If so, how do I do
>> this? If not, what should I be doing?
>>
>> Thanks,
>> Derek
>> 
> >
>   


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Accessing Multiple Databases

2007-12-11 Thread [EMAIL PROTECTED]

There is a Multiple Database Branch which is not under active
development...and doesn't have some of the new stuff in the
trunk...but I'm using it in one of my projects...works pretty good for
the most part.

http://code.djangoproject.com/wiki/MultipleDatabaseSupport

On Dec 11, 2:48 pm, Derek Steinkamp <[EMAIL PROTECTED]> wrote:
> I read through all the relevant documentation but I couldn't find any
> info on an issue I am about to face: accessing multiple tables in
> different databases with Django.
>
> Here's a quick example:
> My Django app (MyApp) has r/w access to the MyApp database on
> MySQLserver1, and all of MyApp models live within here. I now need to
> access a pre-existing database/table on MySQLserver2 to bring in some
> data relevant to MyApp.
>
> My ultimate question is: does Django support accessing models that live
> in/on different databases/servers within one app? If so, how do I do
> this? If not, what should I be doing?
>
> Thanks,
> Derek
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Accessing Multiple Databases

2007-12-11 Thread Derek Steinkamp

I read through all the relevant documentation but I couldn't find any 
info on an issue I am about to face: accessing multiple tables in 
different databases with Django.

Here's a quick example:
My Django app (MyApp) has r/w access to the MyApp database on 
MySQLserver1, and all of MyApp models live within here. I now need to 
access a pre-existing database/table on MySQLserver2 to bring in some 
data relevant to MyApp.

My ultimate question is: does Django support accessing models that live 
in/on different databases/servers within one app? If so, how do I do 
this? If not, what should I be doing?

Thanks,
Derek


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---