You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
424 B
17 lines
424 B
#coding:utf-8
|
|
|
|
from django.contrib import admin
|
|
from todo.models import Type, ParentType
|
|
|
|
class ParentTypeAdmin(admin.ModelAdmin):
|
|
list_display = ('id', 'name')
|
|
|
|
|
|
class TypeAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'parent', 'base', 'value', 'type')
|
|
ordering = ['parent']
|
|
search_fields = ('name', 'parent__name',)
|
|
|
|
admin.site.register(ParentType, ParentTypeAdmin)
|
|
admin.site.register(Type, TypeAdmin)
|