Source

django-pim / projects / admin.py

Full commit
Kevin Veroneau fffb63b 





















from django.contrib import admin
from projects.models import Project, Goal, Note

class ProjectAdmin(admin.ModelAdmin):
    date_hierarchy = 'created_on'
    list_display = ('title', 'active', 'complete', 'created_on',)
    list_filter = ('active', 'complete',)
    search_fields = ['title', 'description']

class GoalAdmin(admin.ModelAdmin):
    date_hierarchy = 'created_on'
    list_display = ('title', 'project', 'complete', 'created_on', 'due_on', 'completed_on',)
    list_filter = ('project', 'complete',)
    search_fields = ['title', 'description']

class NoteAdmin(admin.ModelAdmin):
    date_hierarchy = 'created_on'
    list_display = ('title', 'created_on',)
    search_fields = ['title', 'description']

admin.site.register(Project, ProjectAdmin)
admin.site.register(Goal, GoalAdmin)
admin.site.register(Note, NoteAdmin)