Ticket #2192: datefield_unique.2.diff
File datefield_unique.2.diff, 644 bytes (added by , 18 years ago) |
---|
-
django/db/models/fields/__init__.py
411 411 def get_db_prep_lookup(self, lookup_type, value): 412 412 if lookup_type == 'range': 413 413 value = [str(v) for v in value] 414 elif lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'ne'):414 elif type(value) is not str and lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'ne'): 415 415 value = value.strftime('%Y-%m-%d') 416 416 else: 417 417 value = str(value)