first commit
This commit is contained in:
commit
b71ea45681
898 changed files with 138202 additions and 0 deletions
32
accounts/admin.py
Normal file
32
accounts/admin.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
from django.contrib import admin
|
||||
|
||||
from accounts.models import Role, Profile
|
||||
|
||||
|
||||
# Register your models here.
|
||||
@admin.register(Role)
|
||||
class RoleAdmin(admin.ModelAdmin):
|
||||
list_display = ['name', 'slug', 'parent', 'is_active']
|
||||
search_fields = ['name', 'slug']
|
||||
list_filter = ['is_active']
|
||||
ordering = ['parent__name', 'name']
|
||||
|
||||
@admin.register(Profile)
|
||||
class ProfileAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
"user",
|
||||
"fullname",
|
||||
"pic_tag",
|
||||
"roles_str",
|
||||
"affairs",
|
||||
"county",
|
||||
"broker",
|
||||
"is_completed",
|
||||
"is_active",
|
||||
"jcreated",
|
||||
]
|
||||
search_fields = ['user__username', 'user__first_name', 'user__last_name', 'user__phone_number']
|
||||
list_filter = ['user', 'roles', 'affairs', 'county', 'broker']
|
||||
date_hierarchy = 'created'
|
||||
ordering = ['-created']
|
||||
readonly_fields = ['created', 'updated']
|
Loading…
Add table
Add a link
Reference in a new issue