Posts

Showing posts from June, 2016

Django 1.8 | email as username

Image
As you all know by default Django offers username and email separately. But if you are like me who wants to use email as the username and want to override the default behavior of django, there are few ways to do it Change the <username> label to 'email' using a custom form. But downside is username field is only 30 char long. Registering a custom user-auth-model, to the existing django-registration process. But downside is you can only do this before the first migration.  There are few modules available which extended username. So you can install that. But the downside is I was not sure if those modules are supported anymore. Building your own auth-model. But this requires lot of time. Making simple tweaks to the existing django-auth-model ( User) and use the existing django-registration ( I'm using django-registration-redux) to take care of everything. There are pros and cons in every model, but l don't want to spend too much time on the login module bec