mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Split url_name template filter into viewname() and validated_viewname()
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{% url 'dcim:device_list' %}">Devices</a></li>
|
||||
<li><a href="{{ instance.device.get_absolute_url }}">{{ instance.device }}</a></li>
|
||||
<li><a href="{% url instance|url_name:"list" %}?device_id={{ instance.device.pk }}">{{ instance|meta:"verbose_name_plural"|bettertitle }}</a></li>
|
||||
<li><a href="{% url instance|viewname:"list" %}?device_id={{ instance.device.pk }}">{{ instance|meta:"verbose_name_plural"|bettertitle }}</a></li>
|
||||
<li>{{ instance }}</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -17,12 +17,12 @@
|
||||
<div class="pull-right noprint">
|
||||
{% plugin_buttons instance %}
|
||||
{% if request.user|can_change:instance %}
|
||||
<a href="{% url instance|url_name:"edit" pk=instance.pk %}" class="btn btn-warning">
|
||||
<a href="{% url instance|viewname:"edit" pk=instance.pk %}" class="btn btn-warning">
|
||||
<span class="fa fa-pencil" aria-hidden="true"></span> Edit
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if request.user|can_delete:instance %}
|
||||
<a href="{% url instance|url_name:"delete" pk=instance.pk %}" class="btn btn-danger">
|
||||
<a href="{% url instance|viewname:"delete" pk=instance.pk %}" class="btn btn-danger">
|
||||
<span class="fa fa-trash" aria-hidden="true"></span> Delete
|
||||
</a>
|
||||
{% endif %}
|
||||
@@ -34,7 +34,7 @@
|
||||
</li>
|
||||
{% if perms.extras.view_objectchange %}
|
||||
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
|
||||
<a href="{% url instance|url_name:"changelog" pk=instance.pk %}">Change Log</a>
|
||||
<a href="{% url instance|viewname:"changelog" pk=instance.pk %}">Change Log</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user