1 2 3 4 5 6 7 8 9 10 11 | {% extends "admin/change_form.html" %}
{% load i18n %}
{% block content %}
{{ block.super }}
<script type="text/javascript">//<![CDATA[
(function($){
$('<input type="submit" value="{% trans 'Save and view next' %}" name="_viewnext" />')
.prependTo('div.submit-row');
})(django.jQuery);
//]]></script>
{% endblock %}
|
More like this
- Admin Save and view next button by ungenio41 3 years ago
- URLField admin widget with View Link button by ungenio41 3 years ago
- Use custom authentication backend with admin by ungenio41 2 years, 9 months ago
- Something like list_detail generic view but returns PDF document instead by aurelije 4 years, 8 months ago
- Simple Admin-button linking to Databrowse by magicrebirth 4 years ago
Comments
Cheers for this (and the other related snippet)
#
you can also override admin/submit_line.html
{% if show_save %}[HTML_REMOVED]input type="submit" value="{% trans 'Save and view next' %}" name="_viewnext" {{ onclick_attrib }}/[HTML_REMOVED] [HTML_REMOVED]input type="submit" value="{% trans 'Save' %}" class="default" name="_save" {{ onclick_attrib }}/>{% endif %}
unfortunately this template can't be overriden on per app model
#