From 920a24e3172c163f1905510d951069c234902b0d Mon Sep 17 00:00:00 2001 From: alireza Date: Tue, 14 Jan 2025 19:43:09 +0330 Subject: [PATCH] feat: Change presenter to teacher --- ...tation_presenters_presentation_teachers.py | 22 +++++++++++++++++++ backend/backend_api/models.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 backend/backend_api/migrations/0063_remove_presentation_presenters_presentation_teachers.py diff --git a/backend/backend_api/migrations/0063_remove_presentation_presenters_presentation_teachers.py b/backend/backend_api/migrations/0063_remove_presentation_presenters_presentation_teachers.py new file mode 100644 index 0000000..7c1c42b --- /dev/null +++ b/backend/backend_api/migrations/0063_remove_presentation_presenters_presentation_teachers.py @@ -0,0 +1,22 @@ +# Generated by Django 4.2.4 on 2025-01-14 16:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('backend_api', '0062_remove_presentationparticipation_certificate_uuid_and_more'), + ] + + operations = [ + migrations.RemoveField( + model_name='presentation', + name='presenters', + ), + migrations.AddField( + model_name='presentation', + name='teachers', + field=models.ManyToManyField(to='backend_api.teacher'), + ), + ] diff --git a/backend/backend_api/models.py b/backend/backend_api/models.py index 396f971..7194db7 100644 --- a/backend/backend_api/models.py +++ b/backend/backend_api/models.py @@ -171,7 +171,7 @@ def __str__(self): class Presentation(models.Model): name = models.CharField(max_length=SMALL_MAX_LENGTH) - presenters = models.ManyToManyField(Presenter) + teachers = models.ManyToManyField(Teacher) desc = models.CharField(max_length=BIG_MAX_LENGTH) year = models.IntegerField(blank=False, default=2020) cost = models.PositiveIntegerField(default=0)