[patch] Correct DateField to not include Time
Index: django/core/meta/fields.py
===================================================================
--- django/core/meta/fields.py (revision 1764)
+++ django/core/meta/fields.py (working copy)
@@ -391,9 +391,9 @@
def get_db_prep_lookup(self, lookup_type, value):
if lookup_type == 'range':
- value = [str(v) for v in value]
+ value = [v.strftime("%Y-%m-%d") for v in value]
else:
- value = str(value)
+ value = value.strftime("%Y-%m-%d")
return Field.get_db_prep_lookup(self, lookup_type, value)
def pre_save(self, value, add):
Change History
(5)
Description: |
modified (diff)
|
Summary: |
Correct DateField to not include Time → [patch] Correct DateField to not include Time
|
Resolution: |
→ invalid
|
Status: |
new → closed
|
Resolution: |
invalid → fixed
|
Changed formatting in description.