gmba_django/app/admin.py

28 lines
733 B
Python

from django.contrib import admin
from .models import *
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, ResourceAdmin)
admin.site.register(Range, RangeAdmin)
admin.site.register(Method)
admin.site.register(Scale)
admin.site.register(Taxon)
admin.site.register(Field, FieldAdmin)