admin.py
498 Bytes
#-*- coding:utf-8 -*-
from django.contrib import admin
from models import Category, Domain, Expression, Meaning, Segment, Source
class ExpressionAdmin(admin.ModelAdmin):
search_fields = ['text', ]
class MeaningAdmin(admin.ModelAdmin):
search_fields = ['expressions__text', ]
admin.site.register(Category)
admin.site.register(Domain)
admin.site.register(Expression, ExpressionAdmin)
admin.site.register(Meaning, MeaningAdmin)
admin.site.register(Segment)
admin.site.register(Source)