Wednesday, March 30, 2011

 for different databases the query could be formatted as
s=temp1.objects.using("mytemp").filter(refId=table1.objects.using("normal").get(pk=something).id)
I cannot understand the get argument but may be if you give it a try with a suitable args."using" differentiates between databases.

For the first problem;
   may be if you get the cursor to the connection you want to keep open and execute sql commands directly on it.This can be done as

from django.db import connections
cursor=connection["your_db_alias used in settings"].cursor()
 

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

No comments:

Post a Comment