From 02240a8fce787a8acc986092c4710c5557e6f2d3 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Mon, 26 Mar 2018 18:07:36 +0200 Subject: [PATCH] Final migrations pour switchs --- .../migrations/0054_auto_20180326_1742.py | 38 +++++++++++++++++++ topologie/templates/topologie/aff_switch.html | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 topologie/migrations/0054_auto_20180326_1742.py diff --git a/topologie/migrations/0054_auto_20180326_1742.py b/topologie/migrations/0054_auto_20180326_1742.py new file mode 100644 index 00000000..cfaff01b --- /dev/null +++ b/topologie/migrations/0054_auto_20180326_1742.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-03-26 15:42 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('topologie', '0053_finalsw'), + ] + + operations = [ + migrations.AlterModelOptions( + name='accesspoint', + options={'permissions': (('view_ap', 'Peut voir une borne'),)}, + ), + migrations.AlterModelOptions( + name='switch', + options={'permissions': (('view_switch', 'Peut voir un objet switch'),)}, + ), + migrations.AlterField( + model_name='port', + name='switch', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ports', to='topologie.Switch'), + preserve_default=False, + ), + migrations.AlterUniqueTogether( + name='port', + unique_together=set([('switch', 'port')]), + ), + migrations.AlterUniqueTogether( + name='switch', + unique_together=set([('stack', 'stack_member_id')]), + ), + ] diff --git a/topologie/templates/topologie/aff_switch.html b/topologie/templates/topologie/aff_switch.html index 948cd209..0805b591 100644 --- a/topologie/templates/topologie/aff_switch.html +++ b/topologie/templates/topologie/aff_switch.html @@ -55,7 +55,7 @@ with this program; if not, write to the Free Software Foundation, Inc., {{switch.stack.name}} {{switch.stack_member_id}} {{switch.model}} - {{switch.details}} + {{switch.interface_set.first.details}} {% include 'buttons/history.html' with href='topologie:history' name='switch' id=switch.pk%} {% can_edit switch %}