We have some legacy code that wants to display a partially filled form. One of 
the fields is required to be non-empty (it's a captcha) so when re-issuing the 
form partially filled I've been doing this

class EmailForm(forms.Form):
  .....
   vericode = forms.CharField(max_length=5, required=True, label='CODE')


  .......

nparams= params.copy()
nparams['vericode'] = ''
ef = EmailFormPangea(nparams)


but I find then that the vericode field is marked as in error when I come to 
render.

To fix this I tried

ef = EmailFormPangea(nparams)
ef.full_clean()
del ef._errors['vericode']

but this looks fairly clunky. Is there a better way to clear errors or to 
indicate that something is not in error during rendering, but should be 
considered erroneous on submission?
-- 
Robin Becker

--~--~---------~--~----~------------~-------~--~----~
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