mirror of
https://github.com/django/django.git
synced 2024-12-25 18:46:22 +00:00
Fixed #8111 -- Error message typo fix. Thanks mzgur.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9dfad99257
commit
567b9f2e28
@ -630,7 +630,7 @@ class DateTimeField(DateField):
|
|||||||
value, usecs = value.split('.')
|
value, usecs = value.split('.')
|
||||||
usecs = int(usecs)
|
usecs = int(usecs)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise validators.ValidationError, _('Enter a valid date/time in YYYY-MM-DD HH:MM[ss[.uuuuuu]] format.')
|
raise validators.ValidationError, _('Enter a valid date/time in YYYY-MM-DD HH:MM[:ss[.uuuuuu]] format.')
|
||||||
else:
|
else:
|
||||||
usecs = 0
|
usecs = 0
|
||||||
kwargs = {'microsecond': usecs}
|
kwargs = {'microsecond': usecs}
|
||||||
@ -647,7 +647,7 @@ class DateTimeField(DateField):
|
|||||||
return datetime.datetime(*time.strptime(value, '%Y-%m-%d')[:3],
|
return datetime.datetime(*time.strptime(value, '%Y-%m-%d')[:3],
|
||||||
**kwargs)
|
**kwargs)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise validators.ValidationError, _('Enter a valid date/time in YYYY-MM-DD HH:MM[ss[.uuuuuu]] format.')
|
raise validators.ValidationError, _('Enter a valid date/time in YYYY-MM-DD HH:MM[:ss[.uuuuuu]] format.')
|
||||||
|
|
||||||
def get_db_prep_value(self, value):
|
def get_db_prep_value(self, value):
|
||||||
# Casts dates into the format expected by the backend
|
# Casts dates into the format expected by the backend
|
||||||
|
Loading…
Reference in New Issue
Block a user