Commit 00e6d851 by Bach Dániel

dashboard: add groupprofile to admin

parent 3cf09597
...@@ -18,17 +18,24 @@ ...@@ -18,17 +18,24 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django import contrib from django import contrib
from django.contrib.auth.admin import UserAdmin from django.contrib.auth.admin import UserAdmin, GroupAdmin
from django.contrib.auth.models import User from django.contrib.auth.models import User, Group
from dashboard.models import Profile from dashboard.models import Profile, GroupProfile
class ProfileInline(contrib.admin.TabularInline): class ProfileInline(contrib.admin.TabularInline):
model = Profile model = Profile
class GroupProfileInline(contrib.admin.TabularInline):
model = GroupProfile
UserAdmin.inlines = (ProfileInline, ) UserAdmin.inlines = (ProfileInline, )
GroupAdmin.inlines = (GroupProfileInline, )
contrib.admin.site.unregister(User) contrib.admin.site.unregister(User)
contrib.admin.site.register(User, UserAdmin) contrib.admin.site.register(User, UserAdmin)
contrib.admin.site.unregister(Group)
contrib.admin.site.register(Group, GroupAdmin)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment