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 91251c86..128040d5 100644 Binary files a/topologie/migrations/__pycache__/0009_auto_20160703_1200.cpython-34.pyc and b/topologie/migrations/__pycache__/0009_auto_20160703_1200.cpython-34.pyc differ diff --git a/topologie/models.py b/topologie/models.py index 99686ca5..e469eefb 100644 --- a/topologie/models.py +++ b/topologie/models.py @@ -19,7 +19,7 @@ class Port(models.Model): port = models.IntegerField() details = models.CharField(max_length=255, blank=True) room = models.ForeignKey('Room', on_delete=models.PROTECT, blank=True, null=True) -# machine_interface = models.OneToOneField('machines.Interface', on_delete=models.PROTECT, blank=True, null=True) + machine_interface = models.OneToOneField('machines.Interface', on_delete=models.PROTECT, blank=True, null=True) class Meta: unique_together = ('_content_type', '_object_id') diff --git a/users/migrations/0016_auto_20160706_1220.py b/users/migrations/0016_auto_20160706_1220.py new file mode 100644 index 00000000..e7983681 --- /dev/null +++ b/users/migrations/0016_auto_20160706_1220.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models +import users.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0015_whitelist'), + ] + + operations = [ + migrations.AlterField( + model_name='ban', + name='date_end', + field=models.DateTimeField(help_text='%d/%m/%y %H:%M:%S'), + ), + migrations.AlterField( + model_name='user', + name='pseudo', + field=models.CharField(unique=True, validators=[users.models.linux_user_validator], max_length=32, help_text='Doit contenir uniquement des lettres, chiffres, ou tirets'), + ), + migrations.AlterField( + model_name='whitelist', + name='date_end', + field=models.DateTimeField(help_text='%d/%m/%y %H:%M:%S'), + ), + ]