Commit e8a767c3 authored by Antoine Vintache's avatar Antoine Vintache Committed by detraz

Add commercial name to switchs.

parent 7a28d1e2
This diff is collapsed.
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2018-10-11 17:30
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('topologie', '0065_auto_20180927_1836'),
]
operations = [
migrations.AddField(
model_name='modelswitch',
name='commercial_name',
field=models.CharField(blank=True, max_length=255, null=True),
),
]
......@@ -388,6 +388,11 @@ class ModelSwitch(AclMixin, RevMixin, models.Model):
"""Un modèle (au sens constructeur) de switch"""
reference = models.CharField(max_length=255)
commercial_name = models.CharField(
max_length=255,
null=True,
blank=True
)
constructor = models.ForeignKey(
'topologie.ConstructorSwitch',
on_delete=models.PROTECT
......
......@@ -35,6 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<tr>
{% trans "Reference" as tr_ref %}
<th>{% include "buttons/sort.html" with prefix='model-switch' col='reference' text=tr_ref %}</th>
<th>{% trans "Commercial name" %}</th>
<th>Firmware</th>
{% trans "Switch constructor" as tr_constructor %}
<th>{% include "buttons/sort.html" with prefix='model-switch' col='constructor' text=tr_constructor %}</th>
......@@ -45,6 +46,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% for model_switch in model_switch_list %}
<tr>
<td>{{ model_switch.reference }}</td>
<td>{{ model_switch.commercial_name }}</td>
<td>{{model_switch.firmware}}</td>
<td>{{ model_switch.constructor }}</td>
<td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment