diff --git a/program/migrations/0146_rename_contentlicense_licensing.py b/program/migrations/0146_rename_contentlicense_licensing.py new file mode 100644 index 0000000000000000000000000000000000000000..69d60f3db7aed1f041f888b7e7f177fd5c704d20 --- /dev/null +++ b/program/migrations/0146_rename_contentlicense_licensing.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.18 on 2025-01-30 14:51 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("program", "0145_alter_timeslot_options"), + ] + + operations = [ + migrations.RenameModel( + old_name="ContentLicense", + new_name="Licensing", + ), + ] diff --git a/program/migrations/0147_rename_content_license_image_licensing.py b/program/migrations/0147_rename_content_license_image_licensing.py new file mode 100644 index 0000000000000000000000000000000000000000..5e6f8958d8e12e2acdbeb73d0a10901394871f48 --- /dev/null +++ b/program/migrations/0147_rename_content_license_image_licensing.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.18 on 2025-01-30 14:52 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("program", "0146_rename_contentlicense_licensing"), + ] + + operations = [ + migrations.RenameField( + model_name="image", + old_name="content_license", + new_name="licensing", + ), + ] diff --git a/program/models.py b/program/models.py index 89fadb033f2b496b923190fd54566dab000d94cc..e4040a5bd26eb2ccf9c715797d34fe311002a721 100644 --- a/program/models.py +++ b/program/models.py @@ -144,7 +144,7 @@ class License(models.Model): return self.identifier -class ContentLicense(models.Model): +class Licensing(models.Model): credits = models.TextField(blank=True, default="", help_text="Credits of the content.") is_use_explicitly_granted_by_author = models.BooleanField( default=False, @@ -173,8 +173,8 @@ class Image(models.Model): width_field="width", help_text="The URI of the image.", ) - content_license = models.ForeignKey( - ContentLicense, + licensing = models.ForeignKey( + Licensing, null=True, on_delete=models.SET_NULL, related_name="images",