Add longerusername plugin to replace user monkey patching
[flowspy] / longerusername / admin.py
1 from django.contrib import admin
2 from django.contrib.auth.admin import UserAdmin
3 from django.contrib.auth.models import User
4
5 from longerusername.forms import UserCreationForm, UserChangeForm
6
7 class LongerUserNameUserAdmin(UserAdmin):
8     add_form = UserCreationForm
9     form = UserChangeForm
10
11 admin.site.unregister(User)
12 admin.site.register(User, LongerUserNameUserAdmin)