From 1d90cbd758d268b05a32c14ff3054b75e436e0e7 Mon Sep 17 00:00:00 2001 From: Boulder Sprinters Date: Tue, 17 Apr 2007 16:56:13 +0000 Subject: [PATCH] boulder-oracle-sprint: Fixed #3748. git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5020 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/fields/__init__.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index f65897a7d8091..9fe6037185b5e 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -580,13 +580,8 @@ def get_manipulator_new_data(self, new_data, rel=False): 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}