Skip to content

Commit eec6225

Browse files
authored
Merge pull request #123 from PiotrIw/fix_issues
v1.5.56 - upgrade django to 5.2
2 parents 048a111 + fd02d45 commit eec6225

File tree

13 files changed

+13
-13
lines changed

13 files changed

+13
-13
lines changed

.contrib/docker/Dockerfile.web

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN pip install --upgrade pip
2323
RUN pip --version
2424
COPY requirements/*.txt ./requirements/
2525
# left for github actions reference:
26-
ARG DJANGO_VERSION='==3.2.23'
26+
ARG DJANGO_VERSION='==5.2'
2727
RUN pip install --no-cache-dir -r requirements/dev.txt
2828
# CMD ["bash", "-c", "python manage.py collectstatic --no-input && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"]
2929
# to allow VScode run and debug django app:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
rev: 1.29.1
2121
hooks:
2222
- id: django-upgrade
23-
args: [--target-version, "4.2"]
23+
args: [--target-version, "5.2"]
2424
- repo: https://github.com/asottile/pyupgrade
2525
rev: v3.21.2
2626
hooks:

feder/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# PEP 396: The __version__ attribute's value SHOULD be a string.
2-
__version__ = "1.5.55.deps"
2+
__version__ = "1.5.56"
33

44

55
# Compatibility to eg. django-rest-framework
987 Bytes
Binary file not shown.

feder/letters/migrations/0043_letter_only_one_or_none_author.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ class Migration(migrations.Migration):
1212
operations = [
1313
migrations.AddConstraint(
1414
model_name='letter',
15-
constraint=models.CheckConstraint(check=models.Q(models.Q(('author_institution__isnull', True), ('author_user__isnull', False)), models.Q(('author_institution__isnull', False), ('author_user__isnull', True)), models.Q(('author_institution__isnull', True), ('author_user__isnull', True)), _connector='OR'), name='only_one_or_none_author'),
15+
constraint=models.CheckConstraint(condition=models.Q(models.Q(('author_institution__isnull', True), ('author_user__isnull', False)), models.Q(('author_institution__isnull', False), ('author_user__isnull', True)), models.Q(('author_institution__isnull', True), ('author_user__isnull', True)), _connector='OR'), name='only_one_or_none_author'),
1616
),
1717
]

feder/letters/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ class Meta:
222222
)
223223
constraints = [
224224
models.CheckConstraint(
225-
check=(
225+
condition=(
226226
models.Q(author_user__isnull=False, author_institution__isnull=True)
227227
| models.Q(
228228
author_user__isnull=True, author_institution__isnull=False

feder/letters/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from django.http import HttpResponseBadRequest, JsonResponse
2929
from django.shortcuts import get_object_or_404
3030
from django.urls import reverse_lazy
31-
from django.utils.datetime_safe import datetime
31+
from django.utils import timezone
3232
from django.utils.encoding import force_str
3333
from django.utils.feedgenerator import Atom1Feed
3434
from django.utils.translation import gettext_lazy as _
@@ -540,8 +540,8 @@ def action(self):
540540
else:
541541
self.object.is_spam = Letter.SPAM.spam
542542
self.object.mark_spam_by = self.request.user
543-
self.object.mark_spam_at = datetime.now()
544-
self.object.save(update_fields=["is_spam", "mark_spam_by"])
543+
self.object.mark_spam_at = timezone.now()
544+
self.object.save(update_fields=["is_spam", "mark_spam_by", "mark_spam_at"])
545545
Alert.objects.link_object(self.object).update(
546546
solver=self.request.user, status=True
547547
)
747 Bytes
Binary file not shown.
-296 Bytes
Binary file not shown.

feder/teryt/locale/pl/LC_MESSAGES/django.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ msgstr "Kujawsko-pomorskie"
8787

8888
#: feder/teryt/templates/teryt/_voivodeship_map.svg.html:92
8989
msgid "Podlaskie"
90-
msgstr "Pomorskie"
90+
msgstr "Podlaskie"
9191

9292
#: feder/teryt/templates/teryt/_voivodeship_map.svg.html:98
9393
msgid "West Pomeranian"
9494
msgstr "Zachodniopomorskie"
9595

9696
#: feder/teryt/templates/teryt/_voivodeship_map.svg.html:104
9797
msgid "Warmian-Masurian"
98-
msgstr "Warmińskomazurskie"
98+
msgstr "Warmińsko-mazurskie"
9999

100100
#: feder/teryt/templates/teryt/_voivodeship_map.svg.html:110
101101
msgid "Pomeranian"

0 commit comments

Comments
 (0)