2017-08-17 13:20:57 -04:00
|
|
|
from django.contrib import admin
|
|
|
|
|
|
|
|
from .models import Position, Attorney
|
|
|
|
|
|
|
|
|
|
|
|
admin.site.register(Position)
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Attorney)
|
|
|
|
class MemberAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('name', 'position', 'phone_formatted', 'email', 'front_page', 'joined', 'thumbnail')
|
|
|
|
list_filter = ['position', 'front_page', 'joined']
|
2017-08-18 21:25:47 -04:00
|
|
|
search_fields = ('email', 'joined', 'name', 'position', 'website', 'phone', 'phone_formatted')
|
2017-08-17 14:22:50 -04:00
|
|
|
fields = ('image_preview', 'image', 'name', 'position', 'biography', 'phone', 'email', 'website', 'front_page', 'joined')
|
2017-08-17 13:20:57 -04:00
|
|
|
readonly_fields = ('image_preview',)
|