admin.py
691 Bytes
from django.contrib import admin
from models import Domain, Expression, Meaning, Segment, Source, MeaningStatus
class ExpressionAdmin(admin.ModelAdmin):
search_fields = ['text', ]
class MeaningAdmin(admin.ModelAdmin):
search_fields = [
'comment',
'expressions__text'
]
list_filter = ('expressions__link__source', 'status',)
class SegmentAdmin(admin.ModelAdmin):
search_fields = ['orth', ]
list_filter = ('has_nps',)
admin.site.register(Domain)
admin.site.register(Expression, ExpressionAdmin)
admin.site.register(Meaning, MeaningAdmin)
admin.site.register(MeaningStatus)
admin.site.register(Segment, SegmentAdmin)
admin.site.register(Source)