Skip to content

Commit

Permalink
Fixed #8111 -- Error message typo fix. Thanks mzgur.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Aug 8, 2008
1 parent 9dfad99 commit 567b9f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/db/models/fields/__init__.py
Expand Up @@ -630,7 +630,7 @@ def to_python(self, value):
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}
Expand All @@ -647,7 +647,7 @@ def to_python(self, value):
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
Expand Down

0 comments on commit 567b9f2

Please sign in to comment.