oacpl/charter_members/admin.py

17 lines
695 B
Python
Raw Normal View History

2017-08-17 13:20:57 -04:00
from django.contrib import admin
2018-01-14 17:24:58 -05:00
from .models import Chapter, Position, Attorney
2017-08-17 13:20:57 -04:00
2018-01-14 17:24:58 -05:00
admin.site.register(Chapter)
2017-08-17 13:20:57 -04:00
admin.site.register(Position)
@admin.register(Attorney)
class MemberAdmin(admin.ModelAdmin):
2018-01-14 21:17:40 -05:00
list_display = ['name', 'position', 'chapter', 'phone_formatted', 'email', 'front_page', 'order', 'joined', 'thumbnail']
2018-01-14 17:24:58 -05:00
list_filter = ['chapter', 'position', 'front_page', 'joined']
2018-01-14 19:32:00 -05:00
search_fields = ['email', 'joined', 'name', 'chapter', 'position', 'website', 'phone', 'phone_formatted']
2018-01-14 21:10:47 -05:00
fields = ['image_preview', 'image', 'name', 'position', 'chapter', 'biography', 'phone', 'email', 'website', 'front_page', 'order', 'joined']
2018-01-14 19:32:00 -05:00
readonly_fields = ['image_preview']