Make Resource, Range and Field fields searchable
This commit is contained in:
parent
7bfb067623
commit
b2ed245dcf
1 changed files with 15 additions and 3 deletions
18
app/admin.py
18
app/admin.py
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue