mirror of
https://github.com/django/django.git
synced 2024-12-24 18:16:19 +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('.')
|
||||
usecs = int(usecs)
|
||||
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:
|
||||
usecs = 0
|
||||
kwargs = {'microsecond': usecs}
|
||||
@ -647,7 +647,7 @@ class DateTimeField(DateField):
|
||||
return datetime.datetime(*time.strptime(value, '%Y-%m-%d')[:3],
|
||||
**kwargs)
|
||||
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):
|
||||
# Casts dates into the format expected by the backend
|
||||
|
Loading…
Reference in New Issue
Block a user