Author: bouldersprinters
Date: 2007-03-14 15:43:43 -0500 (Wed, 14 Mar 2007)
New Revision: 4727
Modified:
django/branches/boulder-oracle-sprint/django/db/backends/oracle/base.py
Log:
boulder-oracle-sprint: Fixed #3721 with Ben Khoo's patch for working around
LazyDate in Oracle.
Modified:
django/branches/boulder-oracle-sprint/django/db/backends/oracle/base.py
===================================================================
--- django/branches/boulder-oracle-sprint/django/db/backends/oracle/base.py
2007-03-14 20:37:03 UTC (rev 4726)
+++ django/branches/boulder-oracle-sprint/django/db/backends/oracle/base.py
2007-03-14 20:43:43 UTC (rev 4727)
@@ -77,6 +77,7 @@
you'll need to use "%%s".
"""
def _rewrite_args(self, query, params=None):
+ from django.db.models import LazyDate
if params is None:
params = []
else:
@@ -87,6 +88,8 @@
params[i] = param.encode('utf-8')
except UnicodeError:
params[i] = str(param)
+ if type(param) == LazyDate:
+ params[i] = param.__get_value__()
args = [(':arg%d' % i) for i in range(len(params))]
query = query % tuple(args)
# cx_Oracle cannot execute a query with the closing ';'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---