Add audience and thema data to catalogue. Also: nicer cover view.
[redakcja.git] / src / catalogue / migrations / 0048_audience_alter_thema_options_thema_plural_thema_slug_and_more.py
diff --git a/src/catalogue/migrations/0048_audience_alter_thema_options_thema_plural_thema_slug_and_more.py b/src/catalogue/migrations/0048_audience_alter_thema_options_thema_plural_thema_slug_and_more.py
new file mode 100644 (file)
index 0000000..e9f255a
--- /dev/null
@@ -0,0 +1,102 @@
+# Generated by Django 4.1.9 on 2023-07-25 12:49
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ("catalogue", "0047_author_woblink"),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name="Audience",
+            fields=[
+                (
+                    "id",
+                    models.AutoField(
+                        auto_created=True,
+                        primary_key=True,
+                        serialize=False,
+                        verbose_name="ID",
+                    ),
+                ),
+                (
+                    "code",
+                    models.CharField(
+                        help_text="Techniczny identifyikator. W miarę możliwości nie należy zmieniać.",
+                        max_length=128,
+                        unique=True,
+                    ),
+                ),
+                (
+                    "name",
+                    models.CharField(
+                        help_text="W formie: „dla … (kogo?)”", max_length=1024
+                    ),
+                ),
+                (
+                    "slug",
+                    models.SlugField(
+                        blank=True,
+                        help_text="Element adresu na WL, w postaci: /dla/slug/. Można zmieniać.",
+                        max_length=255,
+                        null=True,
+                        unique=True,
+                    ),
+                ),
+                ("description", models.TextField(blank=True)),
+                (
+                    "thema",
+                    models.CharField(
+                        blank=True,
+                        help_text="Odpowiadający kwalifikator Thema.",
+                        max_length=32,
+                    ),
+                ),
+            ],
+            options={
+                "ordering": ("code",),
+            },
+        ),
+        migrations.AlterModelOptions(
+            name="thema",
+            options={"ordering": ("code",), "verbose_name_plural": "Thema"},
+        ),
+        migrations.AddField(
+            model_name="thema",
+            name="plural",
+            field=models.CharField(
+                blank=True, max_length=255, verbose_name="liczba mnoga"
+            ),
+        ),
+        migrations.AddField(
+            model_name="thema",
+            name="slug",
+            field=models.SlugField(
+                blank=True,
+                help_text="Element adresu na WL, w postaci: /tag/slug/. Można zmieniać.",
+                max_length=255,
+                null=True,
+                unique=True,
+            ),
+        ),
+        migrations.AddField(
+            model_name="thema",
+            name="usable_as_main",
+            field=models.BooleanField(default=False),
+        ),
+        migrations.AddField(
+            model_name="thema",
+            name="woblink_category",
+            field=models.IntegerField(blank=True, null=True),
+        ),
+        migrations.AlterField(
+            model_name="genre",
+            name="plural",
+            field=models.CharField(
+                blank=True, max_length=255, verbose_name="liczba mnoga"
+            ),
+        ),
+    ]