oacpl/charter_members/admin.py

17 lines
754 B
Python
Raw Normal View History

2017-08-17 13:20:57 -04:00
from django.contrib import admin
2018-01-25 00:18:13 -05:00
from .models import Region, Position, Attorney
2017-08-17 13:20:57 -04:00
2018-01-25 00:18:13 -05:00
admin.site.register(Region)
2017-08-17 13:20:57 -04:00
admin.site.register(Position)
@admin.register(Attorney)
class MemberAdmin(admin.ModelAdmin):
2018-01-25 00:18:13 -05:00
list_display = ['last_name', 'first_name', 'position', 'region', 'phone_formatted', 'email', 'front_page', 'order', 'joined', 'thumbnail']
list_filter = ['region', 'position', 'front_page', 'joined']
search_fields = ['email', 'joined', 'last_name', 'first_name', 'region', 'position', 'website', 'phone', 'phone_formatted']
2018-02-26 22:45:26 -05:00
fields = ['image_preview', 'image', 'user', 'last_name', 'first_name', 'position', 'region', 'biography', 'phone', 'email', 'website', 'front_page', 'order', 'joined']
2018-01-14 19:32:00 -05:00
readonly_fields = ['image_preview']