roadmap/project/admin.py
Tyrel Souza 588825332f Splitting serializers. M2M Changes
I took the serializers and put them in their own file.
I made the due dates be attached to the project  with a foreign key, rather than M2M, better admin inline.
2015-03-10 00:14:17 -04:00

20 lines
603 B
Python

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
class CategoryClass(OrderableAdmin):
list_display = ('__unicode__', 'sort_order_display')
class ProjectAdmin(admin.ModelAdmin):
list_display = ('title','description','status')
fields = ['title','description','status']
inlines = (DueDateInline,)
admin.site.register(Project, ProjectAdmin)
admin.site.register(DueDate)
admin.site.register(Category, CategoryClass)