28 lines
637 B
Python
28 lines
637 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']
|
||
|
list_display = ('title', 'version', 'file')
|
||
|
list_filter = ('authors', )
|
||
|
admin.site.register(models.Text, TextAdmin)
|
||
|
|
||
|
|
||
|
class AuthorAdmin(admin.ModelAdmin):
|
||
|
search_fields = ['name']
|
||
|
list_display = ('name', )
|
||
|
admin.site.register(models.Author, AuthorAdmin)
|
||
|
|
||
|
|
||
|
class LanguageAdmin(admin.ModelAdmin):
|
||
|
search_fields = ['name']
|
||
|
list_display = ('name', )
|
||
|
admin.site.register(models.Language, LanguageAdmin)
|
||
|
|