Show more fields in admin
This commit is contained in:
parent
588825332f
commit
f9be1484b1
|
@ -6,6 +6,8 @@ from project.models import Project, DueDate, Category
|
|||
|
||||
class DueDateInline(admin.TabularInline):
|
||||
model = DueDate
|
||||
extra = 1
|
||||
|
||||
|
||||
class CategoryClass(OrderableAdmin):
|
||||
list_display = ('__unicode__', 'sort_order_display')
|
||||
|
@ -15,6 +17,11 @@ class ProjectAdmin(admin.ModelAdmin):
|
|||
fields = ['title','description','status']
|
||||
inlines = (DueDateInline,)
|
||||
|
||||
|
||||
class DueDateClass(admin.ModelAdmin):
|
||||
list_display = ('__unicode__', 'project', 'due', 'completed')
|
||||
|
||||
|
||||
admin.site.register(Project, ProjectAdmin)
|
||||
admin.site.register(DueDate)
|
||||
admin.site.register(DueDate, DueDateClass)
|
||||
admin.site.register(Category, CategoryClass)
|
|
@ -18,6 +18,9 @@ class Project(models.Model):
|
|||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.title
|
||||
|
||||
|
||||
class Category(Orderable):
|
||||
title = models.CharField(max_length=256)
|
||||
|
|
Loading…
Reference in New Issue
Block a user