-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.py
29 lines (17 loc) · 800 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
23
24
25
26
27
28
29
from django.contrib import admin
# Register your models here.
from profiles.models import BaseProfile, ProfilePhone, Gender
class BaseProfileAdmin(admin.ModelAdmin):
list_display = ('created', 'user', 'first_name', 'last_name')
list_filter = ('gender',)
search_fields = ('first_name', 'last_name', 'user')
ordering = ('-created',)
admin.site.register(BaseProfile, BaseProfileAdmin)
class ProfilePhoneAdmin(admin.ModelAdmin):
list_display = ('number', 'profile', 'carrier', 'is_public', 'is_active')
list_filter = ('profile', 'carrier', 'is_public', 'is_active')
search_fields = ('profile', 'carrier')
admin.site.register(ProfilePhone, ProfilePhoneAdmin)
class GenderAdmin(admin.ModelAdmin):
list_display = ('name',)
admin.site.register(Gender, GenderAdmin)