Skip to content

Commit

Permalink
Upgrade to Django 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanthratna committed Dec 13, 2021
1 parent ff92617 commit c272079
Show file tree
Hide file tree
Showing 16 changed files with 487 additions and 388 deletions.
7 changes: 4 additions & 3 deletions compose/django/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9.9-slim-bullseye
FROM python:3.10.1-slim-bullseye

ENV \
# python:
Expand All @@ -9,7 +9,7 @@ ENV \
# pip:
PIP_NO_CACHE_DIR=1 \
# poetry:
POETRY_VERSION=1.1.11 \
POETRY_VERSION=1.1.12 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
PATH="$PATH:/root/.poetry/bin"
Expand Down Expand Up @@ -39,6 +39,7 @@ RUN \

# Install dependencies of dependencies:
&& apt-get install --no-install-recommends -y \
"gfortran=4:10.2.1-1" \
"git=1:2.30.2-1" \
"g++=4:10.2.1-1" \
"libffi-dev=3.3-6" \
Expand All @@ -53,7 +54,7 @@ RUN \
fi \

# Install Poetry and project dependencies:
&& curl -sSL "https://raw.githubusercontent.com/python-poetry/poetry/$POETRY_VERSION/get-poetry.py" | python - \
&& python3 -m pip install "poetry==$POETRY_VERSION" \
&& poetry config virtualenvs.create false \
&& poetry run python -m pip install --upgrade --no-cache-dir pip wheel \
&& if [[ "$DEBUG" = "true" ]]; then \
Expand Down
2 changes: 1 addition & 1 deletion compose/redis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM redis:6.2.6-alpine3.14
FROM redis:6.2.6-alpine3.15
COPY redis.conf /usr/local/etc/redis/redis.conf
CMD ["redis-server", "/usr/local/etc/redis/redis.conf" ]
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- ./judge/fixtures:/app/judge/fixtures

postgres:
image: postgres:13.5-alpine3.14
image: postgres:13.5-alpine3.15
restart: always
shm_size: 256MB
environment:
Expand All @@ -40,5 +40,5 @@ services:
net.core.somaxconn: '511'

memcached:
image: memcached:1.6.12-alpine3.14
image: memcached:1.6.12-alpine3.15
restart: always
5 changes: 3 additions & 2 deletions hacktj_live/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,12 @@
]

PASSWORD_HASHERS = [
"django.contrib.auth.hashers.ScryptPasswordHasher",
"django.contrib.auth.hashers.Argon2PasswordHasher",
"django.contrib.auth.hashers.PBKDF2PasswordHasher",
"django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher",
"django.contrib.auth.hashers.BCryptSHA256PasswordHasher",
"django.contrib.auth.hashers.BCryptPasswordHasher",
"django.contrib.auth.hashers.PBKDF2PasswordHasher",
"django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher",
]


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Generated by Django 4.0 on 2021-12-12 23:49

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
("judge", "0006_auto_20211114_2300"),
]

operations = [
migrations.AlterField(
model_name="annotator",
name="current",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="%(class)s_current",
to="judge.project",
),
),
migrations.AlterField(
model_name="annotator",
name="ignore",
field=models.ManyToManyField(
related_name="%(class)s_ignore", to="judge.Project"
),
),
migrations.AlterField(
model_name="annotator",
name="prev",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="%(class)s_prev",
to="judge.project",
),
),
migrations.AlterField(
model_name="annotator",
name="viewed",
field=models.ManyToManyField(
related_name="%(class)s_viewed", to="judge.Project"
),
),
migrations.AlterField(
model_name="decision",
name="loser",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_loser",
to="judge.project",
),
),
migrations.AlterField(
model_name="decision",
name="winner",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_winner",
to="judge.project",
),
),
]
Loading

0 comments on commit c272079

Please sign in to comment.