浏览代码

Merge branch 'dev' into release/2

Vince Salvino 1 年之前
父节点
当前提交
d5283033d3

+ 22 - 0
coderedcms/migrations/0038_alter_classifier_slug.py

@@ -0,0 +1,22 @@
+# Generated by Django 4.1.10 on 2023-07-12 18:53
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+    dependencies = [
+        ("coderedcms", "0037_coderedpage_related_classifier_term_and_more"),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name="classifier",
+            name="slug",
+            field=models.SlugField(
+                allow_unicode=True,
+                max_length=255,
+                unique=True,
+                verbose_name="Slug",
+            ),
+        ),
+    ]

+ 1 - 0
coderedcms/models/snippet_models.py

@@ -141,6 +141,7 @@ class Classifier(ClusterableModel):
         allow_unicode=True,
         unique=True,
         verbose_name=_("Slug"),
+        max_length=255,
     )
     name = models.CharField(
         max_length=255,

+ 2 - 2
coderedcms/templates/coderedcms/blocks/film_strip_block.html

@@ -9,8 +9,8 @@
         {% image panel.background_image original as image %}
         <div data-block="film-panel" class="col-auto col crx-filmstrip-panel {{panel.custom_css_class}}" {% if panel.custom_id %}id="{{panel.custom_id}}"{% endif %} style="
           {% if image %}background-image: url({{image.url}}); background-size: cover; background-position: center;{% endif %}
-          {% if panel.background_color %}background-color: {{panel.background_color}}{% endif %}
-          {% if panel.foreground_color %}color: {{panel.foreground_color}}{% endif %}
+          {% if panel.background_color %}background-color: {{panel.background_color}};{% endif %}
+          {% if panel.foreground_color %}color: {{panel.foreground_color}};{% endif %}
         ">
           {% include_block panel.content %}
         </div>

+ 1 - 0
coderedcms/templates/coderedcms/blocks/quote_block.html

@@ -6,4 +6,5 @@
 {% if self.author %}
 <figcaption class="blockquote-footer">{{self.author}}</figcaption>
 {% endif %}
+</figure>
 {% endblock %}

+ 9 - 1
coderedcms/views.py

@@ -7,7 +7,7 @@ from django.http import (
     HttpResponsePermanentRedirect,
     JsonResponse,
 )
-from django.contrib.auth.decorators import login_required
+from django.contrib.auth.decorators import login_required, permission_required
 from django.contrib.contenttypes.models import ContentType
 from django.core.paginator import (
     Paginator,
@@ -278,6 +278,10 @@ def event_get_calendar_events(request):
 
 
 @login_required
+@permission_required(
+    "wagtailadmin.access_admin",
+    login_url="wagtailadmin_login",
+)
 def import_index(request):
     """
     Landing page to replace wagtailimportexport.
@@ -286,6 +290,10 @@ def import_index(request):
 
 
 @login_required
+@permission_required(
+    "wagtailadmin.access_admin",
+    login_url="wagtailadmin_login",
+)
 def import_pages_from_csv_file(request):
     """
     Overwrite of the `import_pages` view from wagtailimportexport.  By default, the `import_pages`

+ 1 - 0
docs/releases/index.rst

@@ -25,6 +25,7 @@ Supported Versions:
 .. toctree::
     :maxdepth: 1
 
+    v2.1.3
     v2.1.2
     v2.1.1
     v2.1.0

+ 18 - 0
docs/releases/v2.1.3.rst

@@ -0,0 +1,18 @@
+v2.1.3 release notes
+====================
+
+Bug fixes:
+
+* Fix HTML syntax error in film strip.
+
+* Fix HTML syntax error in quote blocks.
+
+* Fix error creating Classifiers when the name is over 50 characters.
+
+* Require Wagtail admin permission for import views.
+
+
+Thank you!
+----------
+
+Thanks to everyone who contributed to `2.1.3 on GitHub <https://github.com/coderedcorp/coderedcms/milestone/48?closed=1>`_.