On Aug 26, 2010, at 9:31 PM, nobosh wrote:

> Hello, I'm on day 7 learning Django and would appreciate any info
> around getting my Django app started with a Registration/Authorization
> which is Email & Password based (not username). I'll don't currently
> have a need for usernames. Is there an app or a clean/smart way to
> implement. I'm trying to avoid bad habits as this is my first step
> after reading the book.
> 

We've done a few apps that use email for auth.  In some cases, we generate a 
random 30-character username, the odds of a collision are very low and we don't 
run into issues trying to truncate an email address so it will conform to the 
username field character and length requirements.  In other cases, where we 
need a deterministic username, we base64 encode a UUID for the username.

We try to not tie the username to a derivative of the email address, so we can 
avoid username collisions if the user changes their email address.

Don't forget to add an index to the email field.

--
Eric Chamberlain, Founder
RF.com - http://RF.com/







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