I am having trouble with Django revision 6110 patched with multi-
db-6110.patch.

Traceback (most recent call last):
  File "<console>", line 1, in ?
  File "/usr/local/lib64/python2.4/site-packages/django/db/models/
query.py", line 108, in __repr__
    return repr(self._get_data())
  File "/usr/local/lib64/python2.4/site-packages/django/db/models/
query.py", line 484, in _get_data
    self._result_cache = list(self.iterator())
  File "/usr/local/lib64/python2.4/site-packages/django/db/backends/
oracle/base.py", line 119, in iterator
    cursor.execute(full_query, params)
  File "/usr/local/lib64/python2.4/site-packages/django/db/backends/
util.py", line 19, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: relation "ttsd_schools" does not exist

The problem seems to be in django/db/backends/oracle/base.py on line
92:

  from django.db import connection

which is later used to get the cursor.  This seems to bypass the use
of the database settings in OTHER_DATABASES.  I would expect to use
connections from django.db rather than connection:

  # Create a manager for named connections
  connections = LazyConnectionManager()

  # Backwards compatibility: establish the default connection and set
the
  # default connection properties at module level, using the lazy
proxy so that
  # each thread may have a different default connection, if so
configured
  connection_info = LocalizingProxy('connection_info', _local,
                                    lambda: connections[_default])
  connection = LocalizingProxy('connection', _local,
                               lambda:
connections[_default].connection)

But I don't see how to get the named connection in oracle/base.py.

If that is clear, I would appreciate any suggestions.

Carlos Hanson


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