from django.contrib import admin from models import Hypernymy, LexicalUnit, Synonymy class LexicalUnitAdmin(admin.ModelAdmin): search_fields = ('base',) class HypernymyAdmin(admin.ModelAdmin): search_fields = ('child__id', 'parent__id') class SynonymyAdmin(admin.ModelAdmin): search_fields = ('child__id', 'parent__id') admin.site.register(LexicalUnit, LexicalUnitAdmin) admin.site.register(Hypernymy, HypernymyAdmin) admin.site.register(Synonymy, SynonymyAdmin)