feat [api]: comment and analysis fields

This commit is contained in:
Alice 2023-01-28 22:53:55 +01:00
parent 760c6f1342
commit 7c33864ae3
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,33 @@
# Generated by Django 4.1.4 on 2023-01-28 22:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("myapi", "0005_film_facebook_event_link"),
]
operations = [
migrations.AddField(
model_name="film",
name="analysis",
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name="film",
name="projection_comment",
field=models.TextField(blank=True, null=True),
),
migrations.AlterField(
model_name="film",
name="language_subtitles",
field=models.CharField(
blank=True,
choices=[("VOF", "French"), ("VOSTFR", "Foreign"), ("VF", "Dubbed")],
max_length=20,
null=True,
),
),
]

View file

@ -38,6 +38,8 @@ class Film(models.Model):
imdb_id = models.CharField(max_length=10, null=True, blank=True)
tmdb_id = models.IntegerField(null=True, blank=True)
facebook_event_link = models.URLField(null=True, blank=True)
projection_comment = models.TextField(null=True, blank=True)
analysis = models.TextField(null=True, blank=True)
def __str__(self):
return f'{self.title} de {self.director} ({self.projection_date.strftime("%d/%m/%Y")})'