Ok, thanks for the example.
On Mon, 2009-11-16 at 11:27 -0800, pjrhar...@gmail.com wrote:
> > 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
> 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
On Mon, 2009-11-16 at 17:57 +0100, Dennis Kaarsemaker wrote:
> On Mon, Nov 16, 2009 at 5:12 PM, Adam Stein wrote:
> > Running Django v1.1.1 on Apache v2.2.8 with Firefox v3.5.4.
> >
> > I have a very simplified and unreal example below to demonstrate what's
> > happening.
On Mon, Nov 16, 2009 at 5:12 PM, Adam Stein wrote:
> Running Django v1.1.1 on Apache v2.2.8 with Firefox v3.5.4.
>
> I have a very simplified and unreal example below to demonstrate what's
> happening.
>
>8 --
>
> def clean(self):
> cleaned = self.cleaned_data
>
>
Running Django v1.1.1 on Apache v2.2.8 with Firefox v3.5.4.
I have a very simplified and unreal example below to demonstrate what's
happening.
class MyForm(forms.Form):
string1 = forms.CharField()
string2 = forms.CharField(widget = forms.HiddenInput())
def clean(self):
5 matches
Mail list logo