Search field in Subscription admin area

This commit is contained in:
Pierre Brunet 2017-11-17 11:48:16 +01:00
parent 64c479a02e
commit bb47ad97a3

View File

@ -25,5 +25,11 @@
from django.contrib import admin
from subscription.models import Subscription
from haystack.admin import SearchModelAdmin
admin.site.register(Subscription)
class SubscriptionAdmin(SearchModelAdmin):
search_fields = ["member__username", "subscription_start", "subscription_end", "subscription_type"]
admin.site.register(Subscription, SubscriptionAdmin)