> if not cleaned.has_key("string2") and
> cleaned.has_key("string1"):
> cleaned["string2"] = string1
>
> return cleaned
>
I think the problem here is that if string2 is not required it will be
in the cleaned dictionary but an empty string. So instead you might
need:
if not cleaned.get('string2', ''):
cleaned['string2'] = string1
I'd still suggest doing it like this though, not in the POST, as you
would need to do that in every view where you use the form.
Peter
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
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=.