roadmap/project/admin.py

27 lines
745 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):
2015-03-10 04:51:06 +00:00
list_display = ('__unicode__', 'project', 'completed_overdue_date')
2015-03-10 04:28:57 +00:00
admin.site.register(Project, ProjectAdmin)
2015-03-10 04:28:57 +00:00
admin.site.register(DueDate, DueDateClass)
admin.site.register(Category, CategoryClass)