I have inherited the support of a Django application and am new to the language so I would appreciate some advice. The application requires getting data from different databases depending on the client.
The existing code uses the syntax: <model table>.objects.using(self.CLIENT_DB).get to connect to the correct databse. However, I have some queries that are so complex I have had to use the rawqueryset with SQL commands such as "for record in <model table>.objects.raw(<my sql command>) . . .". Apparently "using" is not an available attribute of the rawqueryset. What is the best way to dynamically change databases when using a rawqueryset? Thanks for your guidance. -- 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.