diff --git a/docker/Dockerfile b/docker/Dockerfile index b35d82f7..73979ad6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -31,7 +31,7 @@ CMD ["yarn", "start"] # BASE # --------------------------------------------------------------------- # Base backend -FROM python:3.10-alpine as base +FROM python:3.12-alpine as base ENV PYCURL_SSL_LIBRARY openssl RUN apk update && apk add postgresql-libs postgresql-client libevent libjpeg openjpeg zlib @@ -85,7 +85,7 @@ COPY docker/init-dev.sh /app/docker/ ADD https://raw.githubusercontent.com/mrako/wait-for/d9699cb9fe8a4622f05c4ee32adf2fd93239d005/wait-for /usr/local/bin/ USER root -RUN apk add --no-cache bash +RUN apk add --no-cache bash postgresql-dev RUN pip3 install -r requirements/dev.txt RUN chmod +rx /usr/local/bin/wait-for USER www diff --git a/ietf/bibliography/models.py b/ietf/bibliography/models.py index c456fe1f..96305861 100644 --- a/ietf/bibliography/models.py +++ b/ietf/bibliography/models.py @@ -143,7 +143,8 @@ def save(self, *args, **kwargs): recreate_bibliography_items = False if recreate_bibliography_items: - self.bibliography_items.all().delete() + if self.pk is not None: + self.bibliography_items.all().delete() all_content = "".join( [ diff --git a/ietf/bibliography/wagtail_hooks.py b/ietf/bibliography/wagtail_hooks.py index 4007ce38..40d3093a 100644 --- a/ietf/bibliography/wagtail_hooks.py +++ b/ietf/bibliography/wagtail_hooks.py @@ -8,6 +8,6 @@ def register_references_menu_item(): return MenuItem( "References", reverse("referenced_types"), - classnames="icon icon-folder-inverse", + classname="icon icon-folder-inverse", order=10000, ) diff --git a/ietf/home/wagtail_hooks.py b/ietf/home/wagtail_hooks.py index 76cabb98..3eccd0a9 100644 --- a/ietf/home/wagtail_hooks.py +++ b/ietf/home/wagtail_hooks.py @@ -8,6 +8,6 @@ def register_resource_menu_item(): return MenuItem( "Documentation", reverse("django-admindocs-docroot"), - classnames="icon icon-folder-inverse", + classname="icon icon-folder-inverse", order=10000, ) diff --git a/ietf/images/migrations/0003_wagtail_42_wagtailimagefield.py b/ietf/images/migrations/0003_wagtail_42_wagtailimagefield.py new file mode 100644 index 00000000..5844449f --- /dev/null +++ b/ietf/images/migrations/0003_wagtail_42_wagtailimagefield.py @@ -0,0 +1,24 @@ +# Generated by Django 4.0.10 on 2023-11-29 10:19 + +from django.db import migrations +import wagtail.images.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('images', '0002_alter_ietfimage_file_hash'), + ] + + operations = [ + migrations.AlterField( + model_name='ietfimage', + name='file', + field=wagtail.images.models.WagtailImageField(height_field='height', upload_to=wagtail.images.models.get_upload_to, verbose_name='file', width_field='width'), + ), + migrations.AlterField( + model_name='ietfrendition', + name='file', + field=wagtail.images.models.WagtailImageField(height_field='height', upload_to=wagtail.images.models.get_rendition_upload_to, width_field='width'), + ), + ] diff --git a/ietf/images/migrations/0004_django_42_rendition_storage.py b/ietf/images/migrations/0004_django_42_rendition_storage.py new file mode 100644 index 00000000..e5348115 --- /dev/null +++ b/ietf/images/migrations/0004_django_42_rendition_storage.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.7 on 2023-11-29 12:17 + +from django.db import migrations +import wagtail.images.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('images', '0003_wagtail_42_wagtailimagefield'), + ] + + operations = [ + migrations.AlterField( + model_name='ietfrendition', + name='file', + field=wagtail.images.models.WagtailImageField(height_field='height', storage=wagtail.images.models.get_rendition_storage, upload_to=wagtail.images.models.get_rendition_upload_to, width_field='width'), + ), + ] diff --git a/ietf/search/templates/search/search.html b/ietf/search/templates/search/search.html index 24099177..a61e30b4 100644 --- a/ietf/search/templates/search/search.html +++ b/ietf/search/templates/search/search.html @@ -1,5 +1,5 @@ {% extends settings.utils.LayoutSettings.base_template %} -{% load static wagtailcore_tags %} +{% load static wagtailcore_tags wagtailsearchpromotions_tags %} {% block title %}Search{% endblock %} @@ -38,6 +38,7 @@

Search results for {{ SITE.hostname }}

+ {% get_search_promotions search_query as search_picks %} {% if search_picks %}

Search results{% if search_query %} for "{{ search_query }}"{% endif %}