mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-17 19:53:21 +00:00
219 lines
7.4 KiB
Python
219 lines
7.4 KiB
Python
|
# -*- coding: utf-8 -*-
|
||
|
# Generated by Django 1.11.20 on 2019-06-15 12:13
|
||
|
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"),
|
||
|
("EC", "EC"),
|
||
|
("CG", "CG"),
|
||
|
("RN", "RN"),
|
||
|
("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=10,
|
||
|
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(
|
||
|
validators=[django.core.validators.MinValueValidator(0)],
|
||
|
verbose_name="hours CM",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"hours_TD",
|
||
|
models.IntegerField(
|
||
|
validators=[django.core.validators.MinValueValidator(0)],
|
||
|
verbose_name="hours TD",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"hours_TP",
|
||
|
models.IntegerField(
|
||
|
validators=[django.core.validators.MinValueValidator(0)],
|
||
|
verbose_name="hours TP",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"hours_THE",
|
||
|
models.IntegerField(
|
||
|
validators=[django.core.validators.MinValueValidator(0)],
|
||
|
verbose_name="hours THE",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"hours_TE",
|
||
|
models.IntegerField(
|
||
|
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="created UVs",
|
||
|
),
|
||
|
),
|
||
|
(
|
||
|
"moderator",
|
||
|
models.ForeignKey(
|
||
|
blank=True,
|
||
|
null=True,
|
||
|
on_delete=django.db.models.deletion.CASCADE,
|
||
|
related_name="moderated_UVs",
|
||
|
to=settings.AUTH_USER_MODEL,
|
||
|
verbose_name="moderated UVs",
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
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",
|
||
|
),
|
||
|
)
|
||
|
],
|
||
|
),
|
||
|
]
|