It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the mixin to the default admin objects | |
from django.contrib.auth import get_user_model | |
from django.contrib.auth.admin import UserAdmin as ContribUserAdmin | |
from django.contrib.auth.forms import UserChangeForm as ContribUserChangeForm, \ | |
UserCreationForm as ContribUserCreationForm | |
from accounts.forms import CaseInsensitiveUsernameMixin # adjust if forms.py is not in `accounts` app | |
class UserChangeForm(CaseInsensitiveUsernameMixin, ContribUserChangeForm): |