mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-23 03:58:45 -06:00
* Enable E501 rule * Configure ruff formatter * Reformat migration files to fix line length violations * Fix various E501 errors * Move table template code to template_code.py & ignore E501 errors * Reformat raw SQL
20 lines
803 B
Python
20 lines
803 B
Python
TENANT_COLUMN = """
|
|
{% if record.tenant %}
|
|
<a href="{{ record.tenant.get_absolute_url }}" title="{{ record.tenant.description }}">{{ record.tenant }}</a>
|
|
{% elif record.vrf.tenant %}
|
|
<a href="{{ record.vrf.tenant.get_absolute_url }}" title="{{ record.vrf.tenant.description }}">{{ record.vrf.tenant }}</a>*
|
|
{% else %}
|
|
—
|
|
{% endif %}
|
|
"""
|
|
|
|
TENANT_GROUP_COLUMN = """
|
|
{% if record.tenant and record.tenant.group %}
|
|
<a href="{{ record.tenant.group.get_absolute_url }}" title="{{ record.tenant.group.description }}">{{ record.tenant.group }}</a>
|
|
{% elif record.vrf.tenant and record.vrf.tenant.group %}
|
|
<a href="{{ record.vrf.tenant.group.get_absolute_url }}" title="{{ record.vrf.tenant.group.description }}">{{ record.vrf.tenant.group }}</a>*
|
|
{% else %}
|
|
—
|
|
{% endif %}
|
|
"""
|