From 7c33864ae374e53b0a82e6ea39338280cc8dfe31 Mon Sep 17 00:00:00 2001 From: _aandres Date: Sat, 28 Jan 2023 22:53:55 +0100 Subject: [PATCH] feat [api]: comment and analysis fields --- ...alysis_film_projection_comment_and_more.py | 33 +++++++++++++++++++ server/myapi/models.py | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 server/myapi/migrations/0006_film_analysis_film_projection_comment_and_more.py diff --git a/server/myapi/migrations/0006_film_analysis_film_projection_comment_and_more.py b/server/myapi/migrations/0006_film_analysis_film_projection_comment_and_more.py new file mode 100644 index 0000000..e8e0cff --- /dev/null +++ b/server/myapi/migrations/0006_film_analysis_film_projection_comment_and_more.py @@ -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, + ), + ), + ] diff --git a/server/myapi/models.py b/server/myapi/models.py index d357387..8378ab2 100644 --- a/server/myapi/models.py +++ b/server/myapi/models.py @@ -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")})'