76 lines
2.8 KiB
Python
76 lines
2.8 KiB
Python
|
# Generated by Django 3.1 on 2020-08-06 15:12
|
||
|
|
||
|
import django.core.validators
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('core', '0004_profilo_colore_tema'),
|
||
|
('Anime', '0001_initial'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.AddField(
|
||
|
model_name='anime',
|
||
|
name='aggiornato_in_data',
|
||
|
field=models.DateField(auto_now=True, null=True),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='anime',
|
||
|
name='creato_in_data',
|
||
|
field=models.DateTimeField(auto_now_add=True, null=True),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='anime',
|
||
|
name='età_consigliata',
|
||
|
field=models.CharField(blank=True, max_length=20, null=True),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='anime',
|
||
|
name='immagine_background',
|
||
|
field=models.ImageField(default='default.png', upload_to=''),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='anime',
|
||
|
name='immagine_poster',
|
||
|
field=models.ImageField(blank=True, null=True, upload_to=''),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='anime',
|
||
|
name='lingua',
|
||
|
field=models.CharField(choices=[('ITA', 'Italiano'), ('SUB-ITA', 'SUB-ITA')], default='ITA', max_length=12),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='anime',
|
||
|
name='qualità_video',
|
||
|
field=models.CharField(blank=True, max_length=20, null=True),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='anime',
|
||
|
name='slug',
|
||
|
field=models.SlugField(blank=True, null=True),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='anime',
|
||
|
name='voto',
|
||
|
field=models.FloatField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1.0), django.core.validators.MaxValueValidator(10.0)]),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='CommentoAnime',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('commento', models.TextField()),
|
||
|
('data_commento', models.DateTimeField(auto_now_add=True)),
|
||
|
('anime', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='commenti_anime', to='Anime.anime')),
|
||
|
('utente', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='commenti_utente_anime', to='core.profilo')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Commento',
|
||
|
'verbose_name_plural': 'Commenti',
|
||
|
},
|
||
|
),
|
||
|
]
|