On Mon, Oct 5, 2009 at 6:46 AM, Gerard <lijss...@gp-net.nl> wrote:

>
> Hi All,
>
> When checking form validity with
>
>        form.is_valid()
> after
>
>        form = AuthenticationForm(data=request.POST)
>
> I get a False when the user is set to inactive. One would think a form can
> be valid besides a user being disabled.
>
> The reason, I want a seperate error messages for incorrect name/passwd
> issues and an account being disabled.
>
> code snippet: http://paste.pocoo.org/show/143049/
>
>
AuthenticationForm already provides an explicit error message for the case
where the account is inactive:

http://code.djangoproject.com/browser/django/tags/releases/1.1/django/contrib/auth/forms.py#L73

Karen

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

Reply via email to