add search_fields to Text admin

This commit is contained in:
Sanjay B 2021-10-28 20:39:04 +05:30
parent 7f71928e2d
commit e29b46b517

View file

@ -21,7 +21,7 @@ class TextAdmin(admin.ModelAdmin):
) )
list_editable = ['public', 'language', 'position'] list_editable = ['public', 'language', 'position']
list_filter = ['language', 'public'] list_filter = ['language', 'public']
search_fields = ['slug', 'title', 'byline']
def item(self, obj): def item(self, obj):
return obj.data.get('item') return obj.data.get('item')
def edit(self, obj): def edit(self, obj):