mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
Merge pull request #94 from theskumar/fix/user-admin
fix(app/user): use proper UserAdmin auth form
This commit is contained in:
commit
e407be9152
|
@ -1,11 +1,12 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
||||||
|
from django.contrib.auth.admin import UserAdmin as AuthUserAdmin
|
||||||
|
|
||||||
from .models import User
|
from .models import User
|
||||||
|
|
||||||
|
|
||||||
class UserAdmin(admin.ModelAdmin):
|
class UserAdmin(AuthUserAdmin):
|
||||||
create_form_class = UserCreationForm
|
create_form_class = UserCreationForm
|
||||||
update_form_class = UserChangeForm
|
update_form_class = UserChangeForm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user