Firt of all you should start with you own user model because changing it 
afterwards is not that easy like stated in the docs.
>From there you can change the username restrictions to your liking and 
implement the cell_phone field.

Then implement you own version of ModelBackend which is also checking email 
and cell phone.
In case you just want to allow email, you can also switch to that with just 
changing a setting: 
https://docs.djangoproject.com/en/2.0/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD


Am Donnerstag, 19. April 2018 13:18:02 UTC+2 schrieb lakshitha kumara:
>
> Hello Guys ,
>
> what is the best way to implement Login with email address, mobile number 
> or username. all those field save as a different field in user table. user 
> can login with any criteria that user provided to registered. its look like 
> how instagram.com does it. i need know what is the best way to implement 
> this. Username field cant include '@' sign and username should be letter, 
> number and '_' .
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cd196388-a59e-4f02-a20e-c1bc8211a1d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to