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