summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-04-17 16:56:13 +0000
committerBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-04-17 16:56:13 +0000
commit1d90cbd758d268b05a32c14ff3054b75e436e0e7 (patch)
tree552e19e2225d58bf403e7847796544cc68f63199
parentab622a35bd75dbaaa712e77b35ee0fdaefabc8a0 (diff)
boulder-oracle-sprint: Fixed #3748.
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5020 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/db/models/fields/__init__.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index f65897a7d8..9fe6037185 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -580,13 +580,8 @@ class DateTimeField(DateField):
def flatten_data(self,follow, obj = None):
val = self._get_val_from_obj(obj)
date_field, time_field = self.get_manipulator_field_names('')
- # cx_Oracle does not support strftime
- if settings.DATABASE_ENGINE == 'oracle':
- return {date_field: (val is not None or ''),
- time_field: (val is not None or '')}
- else:
- return {date_field: (val is not None and val.strftime("%Y-%m-%d") or ''),
- time_field: (val is not None and val.strftime("%H:%M:%S") or '')}
+ return {date_field: (val is not None and val.strftime("%Y-%m-%d") or ''),
+ time_field: (val is not None and val.strftime("%H:%M:%S") or '')}
def formfield(self, **kwargs):
defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}