Ticket #2211: datefield_lookup.diff
File datefield_lookup.diff, 549 bytes (added by , 18 years ago) |
---|
-
__init__.py
412 412 if lookup_type == 'range': 413 413 value = [str(v) for v in value] 414 414 elif lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'ne'): 415 value = value.strftime('%Y-%m-%d')415 value = self.to_python(value).strftime('%Y-%m-%d') 416 416 else: 417 417 value = str(value) 418 418 return Field.get_db_prep_lookup(self, lookup_type, value)