from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register
from .models import Person


class PeopleAdmin(ModelAdmin):
    model = Person
    menu_icon = 'group'
    menu_label = 'Team'
    menu_order = 300
    list_display = ('full_name', 'production', 'role')
    list_filter = ('role', 'production')
    ordering = ('-production',)
    search_fields = ('last_name', 'first_name', 'biography')

    # pylint: disable=no-self-use
    def full_name(self, obj):
        return "%s %s" % (
            obj.first_name,
            obj.last_name
        )
    full_name.short_description = 'name'
    full_name.admin_order_field = 'last_name'

wagtailmodeladmin_register(PeopleAdmin)

@@ -1,12 +1,55 @@
+from django.utils.html import format_html%0A%0A
 from wagtail
@@ -113,16 +113,17 @@
 egister%0A
+%0A
 from .mo
@@ -282,16 +282,33 @@
 play = (
+'profile_photo', 
 'full_na
@@ -472,16 +472,42 @@
 y')%0A%0A   
+ def full_name(self, obj):
  # pylin
@@ -533,38 +533,8 @@
 use%0A
-    def full_name(self, obj):%0A
     
@@ -661,16 +661,16 @@
  'name'%0A
-
     full
@@ -708,16 +708,362 @@
 _name'%0A%0A
+    def profile_photo(self, obj):%0A        return format_html(%0A            '%3Cimg src=%22%7B%7D%22 title=%22%7B%7D%22 alt=%22%7B%7D%22 style=%22height:40px%22%3E',%0A            obj.photo.file.url,%0A            obj.photo,%0A            %22team member profile photo of %22 + self.full_name(obj)%0A        )%0A    profile_photo.allow_tags = True%0A    profile_photo.short_description = 'photo'%0A%0A
 wagtailm

Add profile photos to list of people.