If you still want to use the contrib.auth app, you can just add your
own backend to the user authentication. It's very easy to do.

http://docs.djangoproject.com/en/dev/topics/auth/#writing-an-authentication-backend

There are some very smart people who prefer not to use contrib.auth
for a variety of reasons, but if you're new to Django it's much *much*
easier to stick with it because there's plenty of documentation, most
people use it, and many open-source apps rely on it.

Here's a backend I wrote to allow users to log in by e-mail address
instead of username. If you read the docs above then this will make
sense (it's based on the sample in the docs):

http://dpaste.com/hold/234692/

However, this doesn't exactly meet your needs, because it doesn't
address the creation of new users with valid, unique usernames as
required by contrib.auth. What my backend does is, when added to
AUTHENTICATION_BACKENDS in settings.py, allow users to log in with
either their username or e-mail address. If you have users who don't
even know they have a "username" then it amounts to the same thing.

Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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