Creating custom user model and custom authentication in Django

While working on some django project you might feel that the default user model is not fulfilling all the requirements. For example you may want to authenticate users by email Id and not by username. You may want to store some more extra information in the user model. In short you might want to define your own custom user model.

In particular we may encounter one out of below four scenarios:

  • You are happy with the way default authentication but you need to store extra information in the model itself.
  • You want different authentication process, for example using email, but do not want to store extra information.

Continue reading “Creating custom user model and custom authentication in Django”