Fixes #1655. Removed explicit field references. (#1656)

* Fixes #1655

Further field name references were found in `consoleport.html`. These have now been removed, so we rely on proper a proper `__str__` implementation of both `ConsolePort` and `ConsoleServerPort`.

* Fixes #1655: Removed explicit field references

Cleaned up all (notable) .name references, and removed them so __str__ can do the lifting. Did not remove the references where it was explicitly referenced to .name (eg. in details). Extended the Secret model to also include the name in __str__, since that was weirdly absent.

* Adapted PR to comply with comments

Re-introduced certain references to make sure explicit references are still used where needed.
This commit is contained in:
Ichabond
2017-11-02 08:51:27 -07:00
committed by Jeremy Stretch
parent e56fc4b1ee
commit b8df05cf88
18 changed files with 37 additions and 34 deletions

View File

@@ -1,13 +1,13 @@
<tr class="powerport{% if pp.power_outlet and not pp.connection_status %} info{% endif %}">
<td>
<i class="fa fa-fw fa-bolt"></i> {{ pp.name }}
<i class="fa fa-fw fa-bolt"></i> {{ pp }}
</td>
{% if pp.power_outlet %}
<td>
<a href="{% url 'dcim:device' pk=pp.power_outlet.device.pk %}">{{ pp.power_outlet.device }}</a>
</td>
<td>
{{ pp.power_outlet.name }}
{{ pp.power_outlet }}
</td>
{% else %}
<td colspan="2">