Standardized the use of return_url for ObjectDeleteView

This commit is contained in:
Jeremy Stretch
2017-01-18 13:30:19 -05:00
parent 9ff59ab686
commit 3eb969de0c
15 changed files with 34 additions and 37 deletions

View File

@@ -50,7 +50,7 @@
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
</button>
{% else %}
<a href="{% url 'dcim:powerport_delete' pk=pp.pk %}" class="btn btn-danger btn-xs">
<a href="{% url 'dcim:powerport_delete' pk=pp.pk %}?return_url={{ device.get_absolute_url }}" class="btn btn-danger btn-xs">
<i class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete port"></i>
</a>
{% endif %}