ernestophone.ens.fr/gestion/migrations/0003_photo.py

86 lines
2.7 KiB
Python
Raw Normal View History

2021-03-31 16:05:26 +02:00
# Generated by Django 2.2.17 on 2021-03-31 13:50
import colorful.fields
from django.db import migrations, models
2021-04-29 00:27:33 +02:00
2021-03-31 16:05:26 +02:00
import gestion.models
class Migration(migrations.Migration):
dependencies = [
2021-04-29 00:27:33 +02:00
("gestion", "0002_auto_20200908_2222"),
2021-03-31 16:05:26 +02:00
]
operations = [
migrations.CreateModel(
2021-04-29 00:27:33 +02:00
name="Photo",
2021-03-31 16:05:26 +02:00
fields=[
2021-04-29 00:27:33 +02:00
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=127)),
(
"cat",
models.CharField(
choices=[
("home_join", "Rejoignez nous"),
("home_contact", "Nous Contacter"),
("home_rep", "Répertoire de l'acceuil"),
("login", "Connexion"),
("change_membre", "Modification du profil"),
("inscription_membre", "Inscription"),
("home", "Calendrier connecté"),
("liste", "Agenda public"),
("part", "Répertoire"),
("n", "N'apparait pas"),
],
default="n",
max_length=127,
),
),
(
"auteur",
models.CharField(
blank=True,
max_length=127,
null=True,
verbose_name="Auteur de l'image",
),
),
(
"url",
models.URLField(
blank=True,
null=True,
verbose_name="Lien vers le site de l'auteur",
),
),
(
"color",
colorful.fields.RGBColorField(
default="#ffffff", verbose_name="Couleur du nom de l'auteur"
),
),
(
"image",
models.ImageField(
default=None,
upload_to="deco",
validators=[gestion.models.Photo.validate_image],
),
),
2021-03-31 16:05:26 +02:00
],
options={
2021-04-29 00:27:33 +02:00
"verbose_name": "Photo",
"verbose_name_plural": "Photos",
2021-03-31 16:05:26 +02:00
},
),
]