Added voucher creation date display in voucher edit view.

This commit is contained in:
Marcus Scholz 2020-08-01 13:31:52 +02:00
parent 8d15610ca2
commit ac2981ffc6
2 changed files with 6 additions and 2 deletions

View File

@ -18,7 +18,11 @@ class ExplorerAdmin(UserAdmin):
model = Explorer model = Explorer
list_display = ['email', 'username',] list_display = ['email', 'username',]
class VoucherAdmin(admin.ModelAdmin):
fields = ['code', 'expires', 'created']
readonly_fields = ['created']
admin.site.register(Explorer, ExplorerAdmin) admin.site.register(Explorer, ExplorerAdmin)
admin.site.register(Voucher) admin.site.register(Voucher, VoucherAdmin)
admin.site.register(Place) admin.site.register(Place)
admin.site.register(PlaceImage) admin.site.register(PlaceImage)