clean up townie admin some

pull/5/head
nathaniel smith 2017-01-21 01:06:35 -08:00
parent ba05ec340c
commit 5532ee7745
1 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ admin.site.unregister(Group)
class PubkeyInline(admin.TabularInline):
model = Pubkey
extra = 1
def bulk_review(madmin, req, qs):
for townie in qs:
@ -20,6 +21,7 @@ bulk_review.short_description = 'mark selected townies as reviewed'
@admin.register(Townie)
class TownieAdmin(admin.ModelAdmin):
inlines = [PubkeyInline]
list_display = ('reviewed', 'username', 'email')
list_display = ('username', 'reviewed', 'email')
ordering = ('reviewed',)
exclude = ('first_name', 'last_name', 'password', 'groups', 'user_permissions', 'last_login')
actions = (bulk_review,)