summaryrefslogtreecommitdiff
path: root/main/admin.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-04-20 10:21:28 -0500
committerDan McGee <dan@archlinux.org>2012-04-20 11:15:03 -0500
commitd21d8be0186413fe1fa5fd6c859786465472ee10 (patch)
tree2309796163078af30b05f340dbe0e816a92f6a84 /main/admin.py
parentc1ccc88d0769afc16363ceb06e5bdcd8605455bf (diff)
UserProfile model and fields shuffle
Move this model into the devel/ application, and move the PGPKeyField which is used only by these models into the application as well. This involves updating some old migrations along the way to ensure we don't reference a field class that no longer exists. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/admin.py')
-rw-r--r--main/admin.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/main/admin.py b/main/admin.py
index 783d07e4..741f6665 100644
--- a/main/admin.py
+++ b/main/admin.py
@@ -1,7 +1,5 @@
from django.contrib import admin
-from django.contrib.auth.models import User
-from django.contrib.auth.admin import UserAdmin
-from main.models import Arch, Donor, Package, Repo, Todolist, UserProfile
+from main.models import Arch, Donor, Package, Repo, Todolist
class DonorAdmin(admin.ModelAdmin):
list_display = ('name', 'visible', 'created')
@@ -31,17 +29,7 @@ class TodolistAdmin(admin.ModelAdmin):
list_display = ('name', 'date_added', 'creator', 'description')
search_fields = ('name', 'description')
-admin.site.unregister(User)
-class UserProfileInline(admin.StackedInline):
- model = UserProfile
-class UserProfileAdmin(UserAdmin):
- inlines = [UserProfileInline]
- list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff', 'is_active')
- list_filter = ('is_staff', 'is_superuser', 'is_active')
-
-
-admin.site.register(User, UserProfileAdmin)
admin.site.register(Donor, DonorAdmin)
admin.site.register(Package, PackageAdmin)