> i user django-register in my project,it is fatastic, but how to: > 1. restrict username length must more than 5 words > 2. make sure email is unique.
Good question. I don't recommend our short-term solution--modify the contrib/auth code--but it was the only way I could figure out how to do it at the time. Our problem was that we were porting a legacy app that had previously allowed case-sensitive, 80 char (*any* chars) user names. We could not easily force the users into the new mold, so we had to start hacking. I would love to move these changes out of the django code. WARNING: The following will cause you grief in the future. Every time you update django to trunk you will need to keep remaking these edits. If you still want to do this, you need to look at django.contrib.auth.models. Look at the User model field 'username', note its validators and its field size. Read the code (and templates) associated with login. You may also want to look at http://www.djangosnippets.org/snippets/74/ for one way to use email as a login id. I won't go into specifics because if you can't figure it out from the above hints then you shouldn't be messing around with the code. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---