forked from leah/django-elsewhere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.py
22 lines (15 loc) · 798 Bytes
/
admin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from django.contrib import admin
from models import *
class ProfileAdmin(admin.ModelAdmin):
raw_id_fields = ['user']
class SocialNetworkProfileAdmin(ProfileAdmin):
list_display = ('user', 'network_id', 'username') #, 'date_added')
class InstantMessengerProfileAdmin(ProfileAdmin):
list_display = ('user', 'network_id', 'username') #, 'date_added')
class WebsiteProfileAdmin(ProfileAdmin):
list_display = ('user', 'name', 'url') #, 'date_added')
## TODO Not sure why I can't grab date_added from the parent Profile model, need to figure this out.
admin.site.register(Network)
admin.site.register(SocialNetworkProfile, SocialNetworkProfileAdmin)
admin.site.register(WebsiteProfile, WebsiteProfileAdmin)
admin.site.register(InstantMessengerProfile, InstantMessengerProfileAdmin)