admin.py 674 Bytes
from django.contrib import admin

from .models import LexicalUnit, LexicalUnitLink, SynsetLink,  Relation, Synset


class LexicalUnitAdmin(admin.ModelAdmin):
    search_fields  = ('base',)
    list_filter = ('pos',)


class LexicalUnitLinkAdmin(admin.ModelAdmin):
    search_fields  = ('parent__base',)
    list_filter    = ('relation',)


class SynsetLinkAdmin(admin.ModelAdmin):
    search_fields  = ('parent__base',)
    list_filter    = ('relation',)


admin.site.register(LexicalUnit, LexicalUnitAdmin)
admin.site.register(LexicalUnitLink, LexicalUnitLinkAdmin)
admin.site.register(SynsetLink, SynsetLinkAdmin)
admin.site.register(Relation)
admin.site.register(Synset)