Apologies...it seems I misunderstood clean_message(). It's not a method, but clean_* is something for each field. I'll continue my research, but would still love to hear from you all about custom login forms and how you handle them.
On May 24, 8:48 pm, Robin <robin.sa...@gmail.com> wrote: > I'm writing a basic login form using the Django built in > authentication system, but my own login form. This may be a mistake, > but it can't hurt to learn how to get it to work? :) > > I have this Django Form: > > class SignInForm(forms.Form): > username = forms.CharField(label='User Name', max_length=30) > password = forms.CharField(label='Password', max_length=30, > widget=forms.PasswordInput(render_value=False)) > > One of the things I'm not sure how to handle is the idea of > redisplaying the form with an error if the login doesn't succeed. The > fields will validate alright, but the authentication may fail. Rather > than redirect to a failure page when I call authenticate(), I would > like to return the user to the sign in page and display an error > message. Is this something I should treat as a custom validation > issue for this form? If so, I've seen mention of a clean_message > function on djangobook.com for 1.0, but it's not in the documentation > for 1.3...is this an old idea I should avoid? > > I've tried to track down this information (new to Django and web dev) > and I'm certainly not expecting a spoon-fed answer. A nudge in the > right direction would be most appreciated. :) -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.