Move public draft url to history button

This commit is contained in:
Gabriel Augendre 2020-12-28 08:25:00 +01:00
parent 5b2a2f79c8
commit 26063bfffb
No known key found for this signature in database
GPG key ID: 1E693F4CE4AEE7B4
2 changed files with 1 additions and 2 deletions

View file

@ -36,7 +36,6 @@ class ArticleAdmin(admin.ModelAdmin):
("created_at", "updated_at"),
"views_count",
"has_code",
"draft_public_url",
]
},
),
@ -58,7 +57,6 @@ class ArticleAdmin(admin.ModelAdmin):
"views_count",
"status",
"published_at",
"draft_public_url",
]
prepopulated_fields = {"slug": ("title",)}
change_form_template = "articles/article_change_form.html"

View file

@ -1,6 +1,7 @@
{% extends 'admin/change_form.html' %}
{% block object-tools-items %}
<li><a href="{{ original.draft_public_url }}" class="historylink" target="_blank">Public draft</a></li>
<li><a href="https://www.markdownguide.org/cheat-sheet/" class="historylink" target="_blank">Markdown cheat sheet</a></li>
{{ block.super }}
{% endblock %}