The default Django\'s User model has some fields, and validation rules, that I don\'t really need. I want to make registration as simple as possible, i.e. requi
There are anumber of ways to do this, but here's what I'd do: I'd allow a user to enter an email, username (which must contain at least one letter and no @ symbols) or mobile number. Then, when I validate it:
@. If so, set it as the user's email, hash it appropriately and set it as their username as well.+. Then, strip the appropriate characters and store it as both mobile number and username (if you're storing the mobile number in another model for SMS purposes or something).I'd also validate the user/phone/email field similarly on login and look in the appropriate place so that if, say, a user signs up with their mobile number and then changes their username (for some other purpose), they can still sign in with their mobile number.