0036_filmstrip_filmpanel.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. # Generated by Django 4.1.7 on 2023-03-30 19:14
  2. import coderedcms.fields
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import modelcluster.fields
  6. class Migration(migrations.Migration):
  7. dependencies = [
  8. ("wagtailimages", "0025_alter_image_file_alter_rendition_file"),
  9. ("coderedcms", "0035_remove_googleapisettings_site_and_more"),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name="FilmStrip",
  14. fields=[
  15. (
  16. "id",
  17. models.AutoField(
  18. auto_created=True,
  19. primary_key=True,
  20. serialize=False,
  21. verbose_name="ID",
  22. ),
  23. ),
  24. ("name", models.CharField(max_length=255, verbose_name="Name")),
  25. ],
  26. options={
  27. "verbose_name": "Film Strip",
  28. },
  29. ),
  30. migrations.CreateModel(
  31. name="FilmPanel",
  32. fields=[
  33. (
  34. "id",
  35. models.AutoField(
  36. auto_created=True,
  37. primary_key=True,
  38. serialize=False,
  39. verbose_name="ID",
  40. ),
  41. ),
  42. (
  43. "sort_order",
  44. models.IntegerField(blank=True, editable=False, null=True),
  45. ),
  46. (
  47. "background_color",
  48. models.CharField(
  49. blank=True,
  50. help_text="Hexadecimal, rgba, or CSS color notation (e.g. #ff0011)",
  51. max_length=255,
  52. verbose_name="Background color",
  53. ),
  54. ),
  55. (
  56. "foreground_color",
  57. models.CharField(
  58. blank=True,
  59. help_text="Hexadecimal, rgba, or CSS color notation (e.g. #ff0011)",
  60. max_length=255,
  61. verbose_name="Text color",
  62. ),
  63. ),
  64. (
  65. "custom_css_class",
  66. models.CharField(
  67. blank=True,
  68. max_length=255,
  69. verbose_name="Custom CSS class",
  70. ),
  71. ),
  72. (
  73. "custom_id",
  74. models.CharField(
  75. blank=True, max_length=255, verbose_name="Custom ID"
  76. ),
  77. ),
  78. (
  79. "content",
  80. coderedcms.fields.CoderedStreamField(
  81. blank=True, use_json_field=True
  82. ),
  83. ),
  84. (
  85. "background_image",
  86. models.ForeignKey(
  87. blank=True,
  88. null=True,
  89. on_delete=django.db.models.deletion.SET_NULL,
  90. related_name="+",
  91. to="wagtailimages.image",
  92. verbose_name="Background image",
  93. ),
  94. ),
  95. (
  96. "film_strip",
  97. modelcluster.fields.ParentalKey(
  98. on_delete=django.db.models.deletion.CASCADE,
  99. related_name="film_panels",
  100. to="coderedcms.filmstrip",
  101. verbose_name="Film Panel",
  102. ),
  103. ),
  104. ],
  105. options={
  106. "verbose_name": "Film Panel",
  107. },
  108. ),
  109. ]