Hi There, It has been possible in the past to use multiple databases with django. There was a branch for it and about a year ago it was bought up to date with trunk. However that branch hasn't seen any activity for some time and is effectively dead. There's now a (low key) effort under way to come up with a new API and to take advantage of the recent work in refactoring the database API to again make it possible to use multiple databases in your django project. As it stands at the moment it's at an early stage, and it's really unlikely that anything significant will happen until django 1.0 arrives.
My advice based on what you've said above would be to use django's ORM for your authentication (and sessions, permissions, groups etc) if it's a good fit for you. That way you'd get all of the great time saving bits of django (like request.user, perms in the template language, authentication cookies etc). In addition to that maybe you'd like to think about using a different ORM for talking to the other database. There is a project underway on google code to make using SQLAlchemy easier with django - this might be the way to go. I'm not sure what others on this mailing list would think about this approach... I'd certainly be interested to hear any thoughts! Cheers, Ben 2008/7/20 CPF_ <[EMAIL PROTECTED]>: > > [EMAIL PROTECTED] wrote: > > Dan wrote: > >> > >> Most ideally we would like to have it so that the application > >> uses DB1 > >> (defined in the settings.py file) as the main database, but when > >> it's > >> down to users, uses DB2.user as the users table. > >> Currently we are thinking of using raw sql, but that would only be a > >> last resort preferably. And at that point I'd be more scrambled > >> on how > >> to use authenticate together with it. > >> > >> > >> If you are using MySQL, you can use the federated engine for tables > >> that are only "symlinks" to real tables in another database but will > >> act as normal tables when doing regular operations on them. > >> > >> It might be possible with other databases too, I don't know. > > Hi Dan, thanks for the reply. > > We are indeed using MySQL, and attemipting to symlink (as the mysql > > documentation at > > http://dev.mysql.com/doc/refman/5.0/en/symbolic-links-to-tables.html ) > > didn't work out ("SQL show index from `users` failed : Table > > 'bingo.users' doesn't exist" is what webmin said) > > > > If you're implying some other technique, I have no idea what you are > > talking about - could you please explain, or redirect to a page > > explaining it? > > > > Thanks. > Sorry for kicking this subject, but I'd really like to have an answer to > that... > > Thanks in advance. > > > > -- Regards, Ben Ford [EMAIL PROTECTED] +447792598685 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---