oacpl/charter_members/admin.py

17 lines
678 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 17:24:58 -05:00
list_display = ('name', 'position', 'chapter', 'phone_formatted', 'email', 'front_page', 'joined', 'thumbnail')
list_filter = ['chapter', 'position', 'front_page', 'joined']
search_fields = ('email', 'joined', 'name', 'chapter', 'position', 'website', 'phone', 'phone_formatted')
fields = ('image_preview', 'image', 'name', 'position', 'chapter', 'biography', 'phone', 'email', 'website', 'front_page', 'joined')
2017-08-17 13:20:57 -04:00
readonly_fields = ('image_preview',)