Skip to content

Commit

Permalink
Merge branch 'update-to-latest-wagtail-and-django' into 'main'
Browse files Browse the repository at this point in the history
Update to latest wagtail and django

See merge request divio/templates/getting-started-with-wagtail!1
  • Loading branch information
Angelo Dini committed Aug 16, 2024
2 parents 037fd2d + 57f9fe0 commit befd159
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Use an official Python runtime based on Debian 10 "buster" as a parent image.
FROM python:3.8.1-slim-buster
# Use an official Python runtime based on Debian 12 "bookworm" as a parent image.
FROM python:3.12-slim-bookworm

# Add user that will be used in the container.
RUN useradd wagtail

# Port used by this container to serve HTTP.
EXPOSE 80
EXPOSE 8000

# Set environment variables.
# 1. Force Python stdout and stderr streams to be unbuffered.
# 2. Set PORT variable that is used by Gunicorn. This should match "EXPOSE"
# command.
ENV PYTHONUNBUFFERED=1 \
PORT=80
PORT=8000

# Install system packages required by Wagtail and Django.
RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-recommends \
build-essential \
libpq-dev \
libmariadbclient-dev \
libmariadb-dev \
libjpeg62-turbo-dev \
zlib1g-dev \
libwebp-dev \
Expand Down
12 changes: 6 additions & 6 deletions mysite/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 4.2.13.
Generated by 'django-admin startproject' using Django 5.1.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/topics/settings/
https://docs.djangoproject.com/en/5.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.2/ref/settings/
https://docs.djangoproject.com/en/5.1/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
Expand Down Expand Up @@ -99,7 +99,7 @@


# Password validation
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
Expand All @@ -118,7 +118,7 @@


# Internationalization
# https://docs.djangoproject.com/en/4.2/topics/i18n/
# https://docs.djangoproject.com/en/5.1/topics/i18n/

LANGUAGE_CODE = "en-us"

Expand All @@ -130,7 +130,7 @@


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/
# https://docs.djangoproject.com/en/5.1/howto/static-files/

STATICFILES_FINDERS = [
"django.contrib.staticfiles.finders.FileSystemFinder",
Expand Down
4 changes: 2 additions & 2 deletions mysite/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{% endif %}

{# Global stylesheets #}
<link rel="stylesheet" type="text/css" href="{% static 'css/mysite2.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/mysite.css' %}">

{% block extra_css %}
{# Override this in templates to add extra stylesheets #}
Expand All @@ -37,7 +37,7 @@
{% block content %}{% endblock %}

{# Global javascript #}
<script type="text/javascript" src="{% static 'js/mysite2.js' %}"></script>
<script type="text/javascript" src="{% static 'js/mysite.js' %}"></script>

{% block extra_js %}
{# Override this in templates to add extra javascript #}
Expand Down
2 changes: 1 addition & 1 deletion mysite/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/
https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/
"""

import os
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Django>=4.2,<5.1
wagtail>=6.1,<6.2
Django>=5.1,<5.2
wagtail>=6.2,<6.3

dj-database-url==2.2.0
psycopg[binary]>=3.1,<3.2
Expand Down

0 comments on commit befd159

Please sign in to comment.