Files @ 457e5739f717
Branch filter:

Location: website/www/conservancy/apps/staff/admin.py

bsturmfels
Add unique constraint to Staff.username.

Previously had some duplicates for "pono" which were causing
MultipleObjectsReturned errors. A username is generally considered to be unique.
1
2
3
4
5
6
7
8
9
from django.contrib import admin
from conservancy.apps.staff.models import Person

class PersonAdmin(admin.ModelAdmin):
    list_display = ("username", "formal_name", "casual_name",
                    "currently_employed")
    list_filter = ["currently_employed"]

admin.site.register(Person, PersonAdmin)