make admin coins searchable

This commit is contained in:
koksnuss 2020-05-22 01:07:21 +02:00
parent af90ae16bf
commit 6da84dd3bd

View File

@ -23,7 +23,12 @@ from django.contrib import admin
from .models import User, Coin, Country, Stamp
class CoinAdmin(admin.ModelAdmin):
list_display = ('value', 'year', 'country', 'stamp', 'name', 'found_by', 'found_on')
list_filter = ('value', 'year', 'country', 'stamp', 'found_by')
search_fields = ['name']
admin.site.register(User)
admin.site.register(Coin)
admin.site.register(Coin, CoinAdmin)
admin.site.register(Country)
admin.site.register(Stamp)