Move public draft url to history button
This commit is contained in:
parent
5b2a2f79c8
commit
26063bfffb
2 changed files with 1 additions and 2 deletions
|
@ -36,7 +36,6 @@ class ArticleAdmin(admin.ModelAdmin):
|
||||||
("created_at", "updated_at"),
|
("created_at", "updated_at"),
|
||||||
"views_count",
|
"views_count",
|
||||||
"has_code",
|
"has_code",
|
||||||
"draft_public_url",
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -58,7 +57,6 @@ class ArticleAdmin(admin.ModelAdmin):
|
||||||
"views_count",
|
"views_count",
|
||||||
"status",
|
"status",
|
||||||
"published_at",
|
"published_at",
|
||||||
"draft_public_url",
|
|
||||||
]
|
]
|
||||||
prepopulated_fields = {"slug": ("title",)}
|
prepopulated_fields = {"slug": ("title",)}
|
||||||
change_form_template = "articles/article_change_form.html"
|
change_form_template = "articles/article_change_form.html"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{% extends 'admin/change_form.html' %}
|
{% extends 'admin/change_form.html' %}
|
||||||
|
|
||||||
{% block object-tools-items %}
|
{% 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>
|
<li><a href="https://www.markdownguide.org/cheat-sheet/" class="historylink" target="_blank">Markdown cheat sheet</a></li>
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Reference in a new issue