8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-23 20:03:11 +00:00
re2o/topologie/migrations/0056_building_switchbay.py
Hugo Levy-Falk c4a104b3b6 I like my black.
Just ran black on the whoe repository. Fix #210.
2019-11-04 22:47:24 +01:00

77 lines
2.4 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),
),
]