The _checklogin decorator in django/contrib/admin/views/decorators.py
is very helpful - if a user enters an email address as their username,
and authentication fails, it gives a message saying that email
addresses are not allowable as usernames.

In a particular app, I am using email addresses as usernames, but
still using the existing admin infrastructure. It seems to be working
fine, except for the error message referred to above which is
displayed on authentication failure. I think that the checking for '@'
is usernames in decorators.py should be conditional either on a
setting in settings.py or a module-level variable which can be set on
a per-deployment basis to turn off the checking, so that the vanilla
"Please enter a correct username and password..." message can be shown
rather than the usually friendlier, but sometimes inappropriate more
specific message.

I'd be happy to submit a patch - just wanted to canvass opinion here
before raising a ticket.

Cheers,

Vinay Sajip


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to