mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-09 11:26:27 +00:00
43 lines
1.6 KiB
Python
43 lines
1.6 KiB
Python
|
# -*- coding: utf-8 -*-
|
||
|
# Generated by Django 1.10.7 on 2018-04-07 17:41
|
||
|
from __future__ import unicode_literals
|
||
|
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
import re2o.mixins
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('topologie', '0055_auto_20180329_0431'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Building',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=255)),
|
||
|
],
|
||
|
options={
|
||
|
'permissions': (('view_building', 'Peut voir un objet batiment'),),
|
||
|
},
|
||
|
bases=(re2o.mixins.AclMixin, re2o.mixins.RevMixin, models.Model),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='SwitchBay',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=255)),
|
||
|
('info', models.CharField(blank=True, help_text='Informations particulières', max_length=255, null=True)),
|
||
|
('building', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='topologie.Building')),
|
||
|
('members', models.ManyToManyField(blank=True, related_name='bay_switches', to='topologie.Switch')),
|
||
|
],
|
||
|
options={
|
||
|
'permissions': (('view_switchbay', 'Peut voir un objet baie de brassage'),),
|
||
|
},
|
||
|
bases=(re2o.mixins.AclMixin, re2o.mixins.RevMixin, models.Model),
|
||
|
),
|
||
|
]
|