Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ModelAdmin modify

  • Loading branch information...
commit 820dc37c0d44c6e354edcedf906dbc75c75faabe 1 parent 8c754a2
@broderboy broderboy authored
Showing with 3 additions and 0 deletions.
  1. +1 −0  README
  2. +2 −0  adminpreview/admin.py
View
1  README
@@ -6,6 +6,7 @@ To get inline Admin Previews in the list view
Example for model Article
class ArticleAdmin(PreviewAdmin, other admin.ModelAdmin,,,_):
+ list_display = (..,.., 'admin_slide_preview')
...
...
View
2  adminpreview/admin.py
@@ -1,4 +1,6 @@
class PreviewAdmin(admin.ModelAdmin):
+ #add to your ModelAdmin
+ #list_display = ('headline','created_date', 'state', 'admin_slide_preview')
def admin_slide_preview(self, obj):
return "<div class=\"previewslide\" id=\"%s/preview/\">+</div>" % obj.id
admin_slide_preview.allow_tags = True
Please sign in to comment.
Something went wrong with that request. Please try again.