Answer the question
In order to leave comments, you need to log in
How to make case insensitive in django?
Django has a user management system out of the box and I'm happy with it. Additional fields, I made a separate model and a one-to-one relationship with the "User" model. But the system is case sensitive. Admin and admin for her are two different users.
Question: how to remove case sensitivity for "username" and "email"?
Answer the question
In order to leave comments, you need to log in
Write your authentication backend and in the authenticate method do a case-insensitive search for an account in the database. In order not to write a lot, you can inherit it from the boxed one, then you can get by with literally one line of code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question