admin.py
828 Bytes
#-*- coding:utf-8 -*-
from django.contrib import admin
from models import Category, Expression, Meaning, Segment, Source
class MeaningAdmin(admin.ModelAdmin):
search_fields = ['expressions__text',]
list_filter = ('category',)
admin.site.register(Category)
admin.site.register(Expression)
admin.site.register(Meaning, MeaningAdmin)
admin.site.register(Segment)
admin.site.register(Source)
# class LemmaAdmin(admin.ModelAdmin):
# filter_horizontal = ('old_frames', 'frames',)
# search_fields = ('entry',)
# list_filter = ('old', 'vocabulary',)
# exclude = ('old_versions', 'frames', 'old_frames', 'skladnica_frames',
# 'B_frames', 'nkjp_examples', 'frame_opinions', 'lemma_nkjp_examples',
# 'status_history')
# admin.site.register(Interpretation, InterpretationAdmin)