From 48d76b3f3fb0828f2627be7c3bcee884c3b715c4 Mon Sep 17 00:00:00 2001 From: chirac Date: Wed, 6 Jul 2016 12:23:45 +0200 Subject: [PATCH] =?UTF-8?q?Simplification,=20=C3=A9vite=20les=20imports=20?= =?UTF-8?q?circulaires,=20permet=20donc=20=C3=A0=20un=20port=20d'avoir=20u?= =?UTF-8?q?ne=20interface,=20et=20=C3=A0=20une=20chambre=20d'avoir=20un=20?= =?UTF-8?q?port=20(<->)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +-- cotisations/models.py | 1 - .../migrations/0014_auto_20160706_1220.py | 20 ++++++++++++ machines/models.py | 1 - search/models.py | 3 -- topologie/admin.py | 2 +- .../migrations/0012_port_machine_interface.py | 21 ++++++++++++ .../0009_auto_20160703_1200.cpython-34.pyc | Bin 800 -> 789 bytes topologie/models.py | 2 +- users/migrations/0016_auto_20160706_1220.py | 30 ++++++++++++++++++ 10 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 machines/migrations/0014_auto_20160706_1220.py create mode 100644 topologie/migrations/0012_port_machine_interface.py create mode 100644 users/migrations/0016_auto_20160706_1220.py diff --git a/.gitignore b/.gitignore index 96622d0f..3828edd8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -settings.py -settings* +settings_local.py *.swp *.pyc +__pycache__ diff --git a/cotisations/models.py b/cotisations/models.py index 2828be38..a7e89292 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -2,7 +2,6 @@ from django.db import models from django import forms from django.forms import ModelForm -from users.models import User class Facture(models.Model): user = models.ForeignKey('users.User', on_delete=models.PROTECT) diff --git a/machines/migrations/0014_auto_20160706_1220.py b/machines/migrations/0014_auto_20160706_1220.py new file mode 100644 index 00000000..c7d7bf04 --- /dev/null +++ b/machines/migrations/0014_auto_20160706_1220.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import machines.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('machines', '0013_auto_20160705_1014'), + ] + + operations = [ + migrations.AlterField( + model_name='interface', + name='dns', + field=models.CharField(unique=True, validators=[machines.models.full_domain_validator], max_length=255, help_text="Obligatoire et unique, doit se terminer en .rez et ne pas comporter d'autres points"), + ), + ] diff --git a/machines/models.py b/machines/models.py index b7aad3e1..da9289ab 100644 --- a/machines/models.py +++ b/machines/models.py @@ -2,7 +2,6 @@ from django.db import models from django.forms import ModelForm, Form, ValidationError from macaddress.fields import MACAddressField -from users.models import User from django.conf import settings import re diff --git a/search/models.py b/search/models.py index 6e3c14d3..60b776fe 100644 --- a/search/models.py +++ b/search/models.py @@ -3,9 +3,6 @@ from django import forms from django.forms import Form from django.forms import ModelForm -from users.models import User -# Create your models here. - CHOICES = ( ('0', 'Actifs'), ('1', 'Désactivés'), diff --git a/topologie/admin.py b/topologie/admin.py index cc32c4ff..f388c688 100644 --- a/topologie/admin.py +++ b/topologie/admin.py @@ -7,7 +7,7 @@ class SwitchAdmin(admin.ModelAdmin): list_display = ('building','number','details') class PortAdmin(admin.ModelAdmin): - list_display = ('switch', 'port','room','details') + list_display = ('switch', 'port','room','machine_interface','details') class RoomAdmin(admin.ModelAdmin): list_display = ('name',) diff --git a/topologie/migrations/0012_port_machine_interface.py b/topologie/migrations/0012_port_machine_interface.py new file mode 100644 index 00000000..558680a8 --- /dev/null +++ b/topologie/migrations/0012_port_machine_interface.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('machines', '0014_auto_20160706_1220'), + ('topologie', '0011_auto_20160704_2153'), + ] + + operations = [ + migrations.AddField( + model_name='port', + name='machine_interface', + field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, null=True, blank=True, to='machines.Interface'), + ), + ] diff --git a/topologie/migrations/__pycache__/0009_auto_20160703_1200.cpython-34.pyc b/topologie/migrations/__pycache__/0009_auto_20160703_1200.cpython-34.pyc index 91251c86ce2fb7c4e58f5c2160c6a7400ae8de71..128040d537a4572445f1da57da1037f1273307eb 100644 GIT binary patch delta 27 jcmZ3$HkFP29S<*8-_5Fx?8_Kgi`W?$7&h-^OlAZCckT!6 delta 38 ucmbQrwt$WO9S<*;