Author: ramiro
Date: 2010-11-10 23:12:05 -0600 (Wed, 10 Nov 2010)
New Revision: 14513
Modified:
django/branches/releases/1.2.X/django/db/backends/oracle/base.py
Log:
[1.2.X] Fixed small multi-db compatibility issue in the Oracle backend.
Also, converted a couple of constructs to a more Python idiomatic form.
Backport of [14512] from trunk
Modified: django/branches/releases/1.2.X/django/db/backends/oracle/base.py
===================================================================
--- django/branches/releases/1.2.X/django/db/backends/oracle/base.py
2010-11-11 05:07:32 UTC (rev 14512)
+++ django/branches/releases/1.2.X/django/db/backends/oracle/base.py
2010-11-11 05:12:05 UTC (rev 14513)
@@ -329,11 +329,11 @@
'istartswith': "LIKE UPPER(TRANSLATE(%s USING NCHAR_CS)) ESCAPE
TRANSLATE('\\' USING NCHAR_CS)",
'iendswith': "LIKE UPPER(TRANSLATE(%s USING NCHAR_CS)) ESCAPE
TRANSLATE('\\' USING NCHAR_CS)",
}
- oracle_version = None
def __init__(self, *args, **kwargs):
super(DatabaseWrapper, self).__init__(*args, **kwargs)
+ self.oracle_version = None
self.features = DatabaseFeatures()
self.ops = DatabaseOperations()
self.client = DatabaseClient(self)
@@ -346,9 +346,9 @@
def _connect_string(self):
settings_dict = self.settings_dict
- if len(settings_dict['HOST'].strip()) == 0:
+ if settings_dict['HOST'].strip():
settings_dict['HOST'] = 'localhost'
- if len(settings_dict['PORT'].strip()) != 0:
+ if settings_dict['PORT'].strip():
dsn = Database.makedsn(settings_dict['HOST'],
int(settings_dict['PORT']),
settings_dict['NAME'])
--
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.