forked from DGNum/gestiojeux
ccd8ee9cc9
Models are now more structured for number of players, and durations can be omitted.
76 lines
3.1 KiB
Python
76 lines
3.1 KiB
Python
# Generated by Django 3.1.2 on 2020-12-12 21:33
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
('inventory', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AlterModelOptions(
|
|
name='category',
|
|
options={'ordering': ['name'], 'verbose_name': 'catégorie'},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='game',
|
|
options={'ordering': ['title'], 'verbose_name': 'jeu', 'verbose_name_plural': 'jeux'},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='tag',
|
|
options={'ordering': ['name']},
|
|
),
|
|
migrations.AddField(
|
|
model_name='game',
|
|
name='illustrator',
|
|
field=models.CharField(blank=True, max_length=256, verbose_name='illustrateur·trice'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='game',
|
|
name='missing_elements',
|
|
field=models.TextField(blank=True, verbose_name='pièces manquantes'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='game',
|
|
name='nb_player_max',
|
|
field=models.PositiveSmallIntegerField(default=20, verbose_name='nombre de joueur·se·s maximum'),
|
|
preserve_default=False,
|
|
),
|
|
migrations.AddField(
|
|
model_name='game',
|
|
name='nb_player_min',
|
|
field=models.PositiveSmallIntegerField(default=2, verbose_name='nombre de joueur·se·s minimum'),
|
|
preserve_default=False,
|
|
),
|
|
migrations.AlterField(
|
|
model_name='game',
|
|
name='duration',
|
|
field=models.CharField(blank=True, max_length=256, verbose_name='durée de partie'),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='game',
|
|
name='player_range',
|
|
field=models.CharField(blank=True, help_text='Affichage personnalisé pour le nombre de joueur·se·s', max_length=256, verbose_name='nombre de joueur·se·s'),
|
|
),
|
|
migrations.CreateModel(
|
|
name='GameComment',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('text', models.TextField(verbose_name='texte')),
|
|
('created_on', models.DateTimeField(auto_now_add=True, verbose_name='date de publication')),
|
|
('modified_on', models.DateTimeField(auto_now=True, verbose_name='date de modification')),
|
|
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='auteur·ice')),
|
|
('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='inventory.game', verbose_name='jeu')),
|
|
],
|
|
options={
|
|
'verbose_name': 'commentaire sur un jeu',
|
|
'verbose_name_plural': 'commentaires sur des jeux',
|
|
'ordering': ['created_on'],
|
|
},
|
|
),
|
|
]
|