forked from timbroder/django-admin-preview
-
Notifications
You must be signed in to change notification settings - Fork 1
Inline preview in the admin list view
aiaio/django-admin-preview
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
To get inline Admin Previews in the list view 1) Inherit from PreviewAdmin in your ModelAdmin 2) In your model's template directory, create a folder called preview, and create a template for that model's preview Example for model Article class ArticleAdmin(PreviewAdmin, other admin.ModelAdmin,,,_): list_display = (..,.., 'admin_slide_preview') ... ... then edit app_that_has_ArticleModel/templates/preview/article.html whatever is in article.html will be shown inline Access your Article object through {{ object }} in the template
About
Inline preview in the admin list view
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published