Added valid column to VouchersAdmin.

This commit is contained in:
Marcus Scholz 2020-09-18 21:03:05 +02:00
parent 2bff4db1d7
commit 6a1229a4ba

View File

@ -15,8 +15,7 @@ from lostplaces.forms import ExplorerCreationForm, ExplorerChangeForm
class VoucherAdmin(admin.ModelAdmin): class VoucherAdmin(admin.ModelAdmin):
fields = ['code', 'expires_when', 'created_when'] fields = ['code', 'expires_when', 'created_when']
readonly_fields = ['created_when'] readonly_fields = ['created_when']
list_display = ('__str__', 'code', 'created_when', 'expires_when') list_display = ('__str__', 'code', 'created_when', 'expires_when', 'valid')
# todo: is_valid (Wurstwasser)
class PhotoAlbumsAdmin(admin.ModelAdmin): class PhotoAlbumsAdmin(admin.ModelAdmin):
list_display = ('label', 'place', 'url' ) list_display = ('label', 'place', 'url' )