Converted IPAM VRF, Aggregate add/edit/delete views to CBVs

This commit is contained in:
Jeremy Stretch
2016-05-09 12:20:46 -04:00
parent 606255e1ab
commit 60daaee204
6 changed files with 62 additions and 157 deletions

View File

@@ -1,20 +1,20 @@
{% extends 'utilities/confirmation_form.html' %}
{% load form_helpers %}
{% block title %}Delete VRF {{ vrf }}?{% endblock %}
{% block title %}Delete VRF {{ obj }}?{% endblock %}
{% block message %}
<p>
Are you sure you want to delete this VRF?
{% if vrf.prefix_set.count %}
{% if obj.prefix_set.count %}
The following prefixes will also be deleted:
{% else %}
(There are no prefixes associated with this VRF.)
{% endif %}
</p>
{% if vrf.prefix_set.count %}
{% if obj.prefix_set.count %}
<ul>
{% for p in vrf.prefix_set.all %}
{% for p in obj.prefix_set.all %}
<li><a href="{% url 'ipam:prefix' pk=p.pk %}">{{ p }}</a></li>
{% endfor %}
</ul>