I have field in a form like,
foo = forms.DateField(required = False, input_formats = '%m/%d/%Y')
Now when I try to enter a date like 10/25/2006 I am getting an error
string index out of range . Full stack trace,

Traceback:
File "C:\Python24\lib\site-packages\django\core\handlers\base.py" in
get_response
  82.                 response = callback(request, *callback_args,
**callback_kwargs)
File "F:\djangoprojects\todolist\todidlist\views.py" in edit_item
  51.         if form.is_valid():
File "C:\Python24\lib\site-packages\django\newforms\forms.py" in
is_valid
  95.         return self.is_bound and not bool(self.errors)
File "C:\Python24\lib\site-packages\django\newforms\forms.py" in
_get_errors
  86.             self.full_clean()
File "C:\Python24\lib\site-packages\django\newforms\forms.py" in
full_clean
  189.                     value = field.clean(value)
File "C:\Python24\lib\site-packages\django\newforms\fields.py" in
clean
  283.                 return datetime.date(*time.strptime(value,
format)[:3])
File "C:\Python24\lib\_strptime.py" in strptime
  287.             format_regex = time_re.compile(format)
File "C:\Python24\lib\_strptime.py" in compile
  264.         return re_compile(self.pattern(format), IGNORECASE)
File "C:\Python24\lib\_strptime.py" in pattern
  256.             processed_format = "%s%s%s" % (processed_format,

Exception Type: IndexError at /edititem/2/
Exception Value: string index out of range

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to