From 2d81d61167d79fc929d5a895029efc367584ed87 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Sat, 9 May 2015 22:23:36 +0530 Subject: [PATCH] Make use of 'admin.register' decorator in admin.py --- .../{{cookiecutter.repo_name}}/users/admin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/admin.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/admin.py index 7425331c..f038b2e2 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/admin.py +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/users/admin.py @@ -27,9 +27,7 @@ class MyUserCreationForm(UserCreationForm): raise forms.ValidationError(self.error_messages['duplicate_username']) +@admin.register(User) class UserAdmin(AuthUserAdmin): form = MyUserChangeForm add_form = MyUserCreationForm - - -admin.site.register(User, UserAdmin)