roadmap/project/admin.py

27 lines
739 B
Python
Raw Normal View History

from django.contrib import admin
from orderable.admin import OrderableAdmin
from project.models import Project, DueDate, Category
# Register your models here.
class DueDateInline(admin.TabularInline):
model = DueDate
2015-03-10 04:28:57 +00:00
extra = 1
class CategoryClass(OrderableAdmin):
list_display = ('__unicode__', 'sort_order_display')
class ProjectAdmin(admin.ModelAdmin):
list_display = ('title','description','status')
fields = ['title','description','status']
inlines = (DueDateInline,)
2015-03-10 04:28:57 +00:00
class DueDateClass(admin.ModelAdmin):
list_display = ('__unicode__', 'project', 'due', 'completed')
admin.site.register(Project, ProjectAdmin)
2015-03-10 04:28:57 +00:00
admin.site.register(DueDate, DueDateClass)
admin.site.register(Category, CategoryClass)