diff options
author | Dusty Phillips <buchuki@gmail.com> | 2008-12-05 19:32:25 -0500 |
---|---|---|
committer | Dusty Phillips <buchuki@gmail.com> | 2008-12-05 19:32:25 -0500 |
commit | 945c52710ab7374f12fc0b66729beaef5e59b5b4 (patch) | |
tree | 96af0115a2ba4b7fcbaca272ed5465f2e85fc902 /main | |
parent | 98155937e072354d6f90558684643aa39a724d9d (diff) |
User profiles are cool. Go go power notebook
Diffstat (limited to 'main')
-rw-r--r-- | main/admin.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/main/admin.py b/main/admin.py index 8c71d097..72de8478 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) |