>From my code,
try:
user = User.objects.get(username__iexact =
self.cleaned_data['username'])
except User.DoesNotExist, KeyError:
raise forms.ValidationError('Invalid username, please try
again.')
if not
On Mon, 2008-04-07 at 07:29 -0700, shabda wrote:
> So is there a cleaner way to work in form.clean instead of doing
> if for.cleaned_datahas_key(field):
> for every element?
It depends what you want to do in the clean() method. The example you
gave in your first post in this thread is not a
So is there a cleaner way to work in form.clean instead of doing
if for.cleaned_datahas_key(field):
for every element?
On Apr 7, 6:06 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 7, 2008 at 8:19 AM, shabda <[EMAIL PROTECTED]> wrote:
>
> > If I have a required field and I do not
On Mon, Apr 7, 2008 at 8:19 AM, shabda <[EMAIL PROTECTED]> wrote:
>
> If I have a required field and I do not specify a value for the field,
> should form.clean get called? My understanding, after reading
>
> http://www.djangoproject.com/documentation/newforms/#custom-form-and-field-validation
>
If I have a required field and I do not specify a value for the field,
should form.clean get called? My understanding, after reading
http://www.djangoproject.com/documentation/newforms/#custom-form-and-field-validation,
is that it should not, as clean_ will fail, and so form.clean
will not be
5 matches
Mail list logo