mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-26 19:10:26 +00:00
example admin2 file cleanup
This commit is contained in:
parent
61ae3ec149
commit
96cde5cc94
1 changed files with 2 additions and 8 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue