Sith/pedagogy/migrations/0001_initial.py
Bartuccio Antoine 5bf5d0277c
pedagogy: create view and form for UV
WARNING: A new group has been created, to be set by the infra team at deployment !!!
2019-06-15 17:01:25 +02:00

215 lines
7.2 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-06-15 15:00
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="EducationDepartment",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
)
],
),
migrations.CreateModel(
name="StudyField",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
)
],
),
migrations.CreateModel(
name="UV",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"code",
models.CharField(
max_length=10,
unique=True,
validators=[
django.core.validators.RegexValidator(
message="The code of an UV must only contains uppercase characters without accent and numbers",
regex="([A-Z0-9]+)",
)
],
verbose_name="code",
),
),
(
"credit_type",
models.CharField(
choices=[
("FREE", "Free"),
("CS", "CS"),
("TM", "TM"),
("OM", "OM"),
("QC", "QC"),
("EC", "EC"),
("RN", "RN"),
("ST", "ST"),
("EXT", "EXT"),
],
default="FREE",
max_length=10,
verbose_name="credit type",
),
),
(
"semester",
models.CharField(
choices=[
("CLOSED", "Closed"),
("AUTUMN", "Autumn"),
("SPRING", "Spring"),
("AUTOMN_AND_SPRING", "Autumn and spring"),
],
default="CLOSED",
max_length=20,
verbose_name="semester",
),
),
(
"language",
models.CharField(
choices=[
("FR", "French"),
("EN", "English"),
("DE", "German"),
("SP", "Spanich"),
],
default="FR",
max_length=10,
verbose_name="language",
),
),
(
"credits",
models.IntegerField(
validators=[django.core.validators.MinValueValidator(0)],
verbose_name="credits",
),
),
("title", models.CharField(max_length=300, verbose_name="title")),
(
"manager",
models.CharField(max_length=300, verbose_name="uv manager"),
),
("objectives", models.TextField(verbose_name="objectives")),
("program", models.TextField(verbose_name="program")),
("skills", models.TextField(verbose_name="skills")),
("key_concepts", models.TextField(verbose_name="key concepts")),
(
"hours_CM",
models.IntegerField(
default=0,
validators=[django.core.validators.MinValueValidator(0)],
verbose_name="hours CM",
),
),
(
"hours_TD",
models.IntegerField(
default=0,
validators=[django.core.validators.MinValueValidator(0)],
verbose_name="hours TD",
),
),
(
"hours_TP",
models.IntegerField(
default=0,
validators=[django.core.validators.MinValueValidator(0)],
verbose_name="hours TP",
),
),
(
"hours_THE",
models.IntegerField(
default=0,
validators=[django.core.validators.MinValueValidator(0)],
verbose_name="hours THE",
),
),
(
"hours_TE",
models.IntegerField(
default=0,
validators=[django.core.validators.MinValueValidator(0)],
verbose_name="hours TE",
),
),
(
"author",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="created_UVs",
to=settings.AUTH_USER_MODEL,
verbose_name="author",
),
),
],
),
migrations.CreateModel(
name="UVComment",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
)
],
),
migrations.CreateModel(
name="UVCommentReport",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
)
],
),
]