example admin2 file cleanup

This commit is contained in:
Daniel Greenfeld 2013-07-07 15:43:43 +02:00
parent 61ae3ec149
commit 96cde5cc94

View file

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# Import your custom models
from django.contrib.auth.models import Group, User
from django.contrib import messages
from django.utils.translation import ugettext_lazy
@ -10,7 +9,7 @@ from djadmin2.actions import DeleteSelectedAction
# Import your custom models
from .actions import CustomPublishAction
from .models import Post, Comment, Event, EventGuide
from .models import Post, Comment
class CommentInline(djadmin2.Admin2Inline):
@ -40,12 +39,7 @@ class CommentAdmin(djadmin2.ModelAdmin2):
list_filter = ['post', ]
class EventAdmin(djadmin2.ModelAdmin2):
list_display = ('date',)
# Register each model with the admin
djadmin2.default.register(Post, PostAdmin)
djadmin2.default.register(Comment, CommentAdmin)
djadmin2.default.register(Event, EventAdmin)
djadmin2.default.register(EventGuide)