Merge branch 'qwann/html/base2' into qwann/html/user
This commit is contained in:
commit
c863fa30ce
2 changed files with 209 additions and 0 deletions
95
equipment/migrations/0001_initial.py
Normal file
95
equipment/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,95 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.5 on 2017-02-21 20:14
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('event', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='AbstractEquipment',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=200, verbose_name='Nom du matériel')),
|
||||
('stock', models.PositiveSmallIntegerField(verbose_name='Quantité disponible')),
|
||||
('description', models.TextField(verbose_name='Description')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'matériel abstrait',
|
||||
'verbose_name_plural': 'matériels abstraits',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='EquipmentAttribution',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('amount', models.PositiveSmallIntegerField(verbose_name='Quantité attribuée')),
|
||||
('remarks', models.TextField(verbose_name="Remarques concernant l'attribution")),
|
||||
('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='event.Activity')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'attribution de matériel',
|
||||
'verbose_name_plural': 'attributions de matériel',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='EquipmentRemark',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('remark', models.TextField(verbose_name='Remarque sur le matériel')),
|
||||
('is_broken', models.BooleanField()),
|
||||
('is_lost', models.BooleanField()),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'remarque sur matériel',
|
||||
'verbose_name_plural': 'remarques sur le matériel',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Equipment',
|
||||
fields=[
|
||||
('abstractequipment_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='equipment.AbstractEquipment')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'matériel permanent',
|
||||
'verbose_name_plural': 'matériels permanents',
|
||||
},
|
||||
bases=('equipment.abstractequipment',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='TemporaryEquipment',
|
||||
fields=[
|
||||
('abstractequipment_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='equipment.AbstractEquipment')),
|
||||
('event', models.ForeignKey(help_text='Évènement pour lequel le matériel a été loué ou emprunté ou apporté', on_delete=django.db.models.deletion.CASCADE, related_name='specific_equipment', to='event.Event')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'matériel temporaire',
|
||||
'verbose_name_plural': 'matériels temporaires',
|
||||
},
|
||||
bases=('equipment.abstractequipment',),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='equipmentremark',
|
||||
name='equipment',
|
||||
field=models.ForeignKey(help_text='Matériel concerné par la remarque', on_delete=django.db.models.deletion.CASCADE, related_name='remarks', to='equipment.AbstractEquipment'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='equipmentattribution',
|
||||
name='equipment',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='equipment.AbstractEquipment'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='abstractequipment',
|
||||
name='activities',
|
||||
field=models.ManyToManyField(related_name='equipment', through='equipment.EquipmentAttribution', to='event.Activity'),
|
||||
),
|
||||
]
|
114
event/migrations/0001_initial.py
Normal file
114
event/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,114 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.5 on 2017-02-21 20:14
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ActivityTag',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=200, verbose_name='Nom du tag')),
|
||||
('is_public', models.BooleanField(help_text="Sert à faire une distinction dans l'affichage selon que cela soit destiné au public ou à l'équipe organisatrice")),
|
||||
('color', models.CharField(help_text='Rentrer une couleur en hexadécimal', max_length=7, validators=[django.core.validators.RegexValidator(message="La chaîne de caractère rentrée n'est pasune couleur en hexadécimal.", regex='^#(?:[0-9a-fA-F]{3}){1,2}$')], verbose_name='Couleur')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'tag',
|
||||
'verbose_name_plural': 'tags',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ActivityTemplate',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(blank=True, max_length=200, null=True, verbose_name="Nom de l'activité")),
|
||||
('is_public', models.NullBooleanField()),
|
||||
('has_perm', models.NullBooleanField()),
|
||||
('min_perm', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='Nombre minimum de permanents')),
|
||||
('max_perm', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='Nombre maximum de permanents')),
|
||||
('description', models.TextField(blank=True, help_text='Public, Visible par tout le monde.', null=True, verbose_name='Description')),
|
||||
('remarks', models.TextField(blank=True, help_text='Visible uniquement par les organisateurs', null=True, verbose_name='Remarques')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'template activité',
|
||||
'verbose_name_plural': 'templates activité',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Event',
|
||||
fields=[
|
||||
('title', models.CharField(max_length=200, verbose_name="Nom de l'évènement")),
|
||||
('slug', models.SlugField(help_text="Seulement des lettres, des chiffres oules caractères '_' ou '-'.", primary_key=True, serialize=False, unique=True, verbose_name='Identificateur')),
|
||||
('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
|
||||
('description', models.TextField(verbose_name='Description')),
|
||||
('beginning_date', models.DateTimeField(verbose_name='Date de début')),
|
||||
('ending_date', models.DateTimeField(verbose_name='Date de fin')),
|
||||
('created_by', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='created_events', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'évènement',
|
||||
'verbose_name_plural': 'évènements',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Place',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=200, verbose_name='Nom du lieu')),
|
||||
('description', models.TextField(blank=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'lieu',
|
||||
'verbose_name_plural': 'lieux',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Activity',
|
||||
fields=[
|
||||
('activitytemplate_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='event.ActivityTemplate')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'activité',
|
||||
'verbose_name_plural': 'activités',
|
||||
},
|
||||
bases=('event.activitytemplate',),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='activitytemplate',
|
||||
name='event',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='activities', to='event.Event'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='activitytemplate',
|
||||
name='place',
|
||||
field=models.ManyToManyField(blank=True, related_name='activities', to='event.Place'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='activitytemplate',
|
||||
name='tags',
|
||||
field=models.ManyToManyField(blank=True, related_name='activities', to='event.ActivityTag'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='activity',
|
||||
name='parent',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='children', to='event.ActivityTemplate'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='activity',
|
||||
name='staff',
|
||||
field=models.ManyToManyField(blank=True, related_name='in_perm_activities', to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
Loading…
Reference in a new issue