28 lines
685 B
Python
28 lines
685 B
Python
# -*- coding: utf-8 -*-
|
|
# vi:si:et:sw=4:sts=4:ts=4
|
|
# Written 2009 by j@mailb.org
|
|
|
|
from django.contrib import admin
|
|
|
|
import models
|
|
|
|
|
|
class TextAdmin(admin.ModelAdmin):
|
|
search_fields = ['title', 'authors__name', 'languages__name']
|
|
list_display = ('title', 'version', 'file', 'updated')
|
|
filter_horizontal = ('authors', )
|
|
|
|
admin.site.register(models.Text, TextAdmin)
|
|
|
|
|
|
class AuthorAdmin(admin.ModelAdmin):
|
|
search_fields = ['name']
|
|
list_display = ('name', 'name_sort')
|
|
admin.site.register(models.Author, AuthorAdmin)
|
|
|
|
|
|
class LanguageAdmin(admin.ModelAdmin):
|
|
search_fields = ['name']
|
|
list_display = ('name', )
|
|
admin.site.register(models.Language, LanguageAdmin)
|
|
|