Make Resource, Range and Field fields searchable

This commit is contained in:
PCoder 2021-10-11 08:23:22 +05:30
parent 7bfb067623
commit b2ed245dcf

View file

@ -6,11 +6,23 @@ class PersonAdmin(admin.ModelAdmin):
search_fields = ['title', 'first_name', 'last_name', 'organisation', 'position', 'country', 'contact_email']
class ResourceAdmin(admin.ModelAdmin):
search_fields = ['title', 'url', 'citation', 'abstract']
class RangeAdmin(admin.ModelAdmin):
search_fields = ['name', 'countries']
class FieldAdmin(admin.ModelAdmin):
search_fields = ['name']
# Register your models here.
admin.site.register(Person, PersonAdmin)
admin.site.register(Resource)
admin.site.register(Range)
admin.site.register(Resource, ResourceAdmin)
admin.site.register(Range, RangeAdmin)
admin.site.register(Method)
admin.site.register(Scale)
admin.site.register(Taxon)
admin.site.register(Field)
admin.site.register(Field, FieldAdmin)