I've got my site's authentication working with and email and password only--no username (thanks to Shawn Milochik for helping me with that). However, I still need to put in a username to make the User model happy. I was hoping to have "user" as a prefix and then some unique number.
I cannot simply copy the email to the username because the username must be less than 30 characters and, after looking into my database, many email addresses go over that. I cannot generate a random number because there could be a collision. I cannot use uuid4().hex because that's 32 characters... I need <30. I cannot use User.objects.count() because that could result in a collision if 2 users register at the same time. Thoughts? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. 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.

