summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorDusty Phillips <buchuki@gmail.com>2008-12-06 01:32:25 +0100
committerDusty Phillips <buchuki@gmail.com>2008-12-06 01:32:25 +0100
commit945c52710ab7374f12fc0b66729beaef5e59b5b4 (patch)
tree96af0115a2ba4b7fcbaca272ed5465f2e85fc902 /main
parent98155937e072354d6f90558684643aa39a724d9d (diff)
downloadarchweb-945c52710ab7374f12fc0b66729beaef5e59b5b4.tar.gz
archweb-945c52710ab7374f12fc0b66729beaef5e59b5b4.tar.xz
User profiles are cool. Go go power notebook
Diffstat (limited to 'main')
-rw-r--r--main/admin.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/main/admin.py b/main/admin.py
index 8c71d09..72de847 100644
--- a/main/admin.py
+++ b/main/admin.py
@@ -1,5 +1,8 @@
from django.contrib import admin
-from archweb_dev.main.models import (AltForum, Arch, Donor, Mirror, Package, Press, Repo)
+from archweb_dev.main.models import (AltForum, Arch, Donor, Mirror,
+ Package, Press, Repo, UserProfile)
+from django.contrib.auth.models import User
+from django.contrib.auth.admin import UserAdmin
class AltForumAdmin(admin.ModelAdmin):
list_display = ('language', 'name')
@@ -28,7 +31,15 @@ class PressAdmin(admin.ModelAdmin):
ordering = ['name']
search_fields = ('name',)
+admin.site.unregister(User)
+class UserProfileInline(admin.StackedInline):
+ model = UserProfile
+class UserProfileAdmin(UserAdmin):
+ inlines = [UserProfileInline]
+
+
+admin.site.register(User, UserProfileAdmin)
admin.site.register(AltForum, AltForumAdmin)
admin.site.register(Donor, DonorAdmin)
admin.site.register(Mirror, MirrorAdmin)