Django 5.2
authorRadek Czajka <radekczajka@wolnelektury.pl>
Tue, 10 Nov 2026 15:43:32 +0000 (16:43 +0100)
committerRadek Czajka <radekczajka@wolnelektury.pl>
Tue, 10 Nov 2026 15:43:32 +0000 (16:43 +0100)
Dockerfile
requirements/requirements-dev.txt [deleted file]
requirements/requirements.txt
src/catalogue/models/book.py
src/oai/handlers.py
src/wolnelektury/settings/basic.py
src/wolnelektury/templates/admin/base_site.html

index 3e8d29d..d9a71d9 100644 (file)
@@ -50,10 +50,6 @@ COPY requirements/requirements.txt requirements.txt
 
 RUN --mount=type=cache,target=/root/.cache/pip \
     pip install -r requirements.txt
-RUN --mount=type=cache,target=/root/.cache/pip \
-    pip install \
-    psycopg2-binary \
-    django-debug-toolbar==3.2.2
 
 RUN addgroup --gid $GID app && \
     adduser --gid $GID --home /app --uid $UID app
diff --git a/requirements/requirements-dev.txt b/requirements/requirements-dev.txt
deleted file mode 100644 (file)
index 5b58a1f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
--i https://py.mdrn.pl/simple/
-
-django-debug-toolbar
-django-debug-toolbar-template-timings
-sphinx
-pyinotify
index 88e374b..cbcc31b 100644 (file)
@@ -1,9 +1,11 @@
 -i https://py.mdrn.pl/simple/
 
 # django
-Django==4.2.30
+Django==5.2.19
 fnpdjango==0.8
 docutils==0.23
+django-debug-toolbar==8.0.0
+psycopg2-binary==2.9.13
 
 pymemcache==4.0.0
 
@@ -11,14 +13,15 @@ django-pipeline==4.1.0
 jsmin==3.0.1
 
 fnp-django-pagination==2.2.13
-django-modeltranslation==0.19.17
+django-modeltranslation==0.20.6
 django-allauth[socialaccount,openid]==65.21.1
 django-extensions==4.1
-djangorestframework==3.17.2
-django-filter==25.1
+djangorestframework==3.18.3
+django-filter==26.2
 djangorestframework-xml==2.0.0
 django-admin-ordering==0.22
-django-countries==7.6.1
+django-countries==9.1.0
+
 
 django-forms-builder @ git+https://github.com/rczajka/django-forms-builder@6533f9442f004d44ed362202b6bdab82b73dd5e9
 
@@ -29,13 +32,13 @@ pyyaml==6.0.3
 
 polib==1.2
 
-django-honeypot==1.2.1
+django-honeypot==1.3.0
 
 Feedparser==6.0.14
 
 Pillow==13.0.0
 mutagen==1.48.1
-sorl-thumbnail==13.0.0
+sorl-thumbnail==13.4.0
 
 zipstream-ng==1.9.3
 
index e9050d0..d09a09a 100644 (file)
@@ -228,7 +228,8 @@ class Book(models.Model):
         if self.preview and not self.preview_key:
             self.preview_key = get_random_hash(self.slug)[:32]
 
-        ret = super(Book, self).save(force_insert, force_update, **kwargs)
+        ret = super(Book, self).save(
+            force_insert=force_insert, force_update=force_update, **kwargs)
 
         return ret
 
index c670449..7ac3f8f 100644 (file)
@@ -1,13 +1,13 @@
 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
 #
-from datetime import datetime
+from datetime import datetime, timezone
 from lxml import etree
 
 from django.conf import settings
 from django.contrib.contenttypes.models import ContentType
 from django.contrib.sites.models import Site
-from django.utils import timezone
+from django.utils.timezone import localtime, make_aware
 from oaipmh import server, common, metadata, error
 
 from api.handlers import WL_BASE
@@ -17,7 +17,7 @@ from librarian import WLURI
 
 
 def make_time_naive(d):
-    return timezone.localtime(d).replace(tzinfo=None)
+    return localtime(d).replace(tzinfo=None)
 
 WL_DC_READER_XPATH = '(.|*)/rdf:RDF/rdf:Description/%s/text()'
 wl_dc_reader = metadata.MetadataReader(
@@ -65,7 +65,7 @@ class Catalogue(common.ResumptionOAIPMH):
         self.oai_id = "oai:" + Site.objects.get_current().domain + ":%s"
 
         # earliest change
-        year_zero = timezone.make_aware(datetime(1990, 1, 1, 0, 0, 0), timezone.utc)
+        year_zero = make_aware(datetime(1990, 1, 1, 0, 0, 0), timezone.utc)
 
         try:
             earliest_change = Book.objects.filter(findable=True, preview=False).order_by('changed_at')[0].changed_at
index 1b86642..86a1a8f 100644 (file)
@@ -124,3 +124,5 @@ MIDDLEWARE = [
 ROOT_URLCONF = 'wolnelektury.urls'
 
 FILE_UPLOAD_PERMISSIONS = 0o640
+
+FORMS_URLFIELD_ASSUME_HTTPS = True
index c23c031..eecf3b2 100644 (file)
@@ -3,7 +3,7 @@
 {% block title %}{{ title }} | Administracja - WolneLektury.pl{% endblock %}
 
 {% block branding %}
-  <h1 id="site-name">Administracja - WolneLektury.pl</h1>
+  <div id="site-name">Administracja - WolneLektury.pl</div>
   <p style="font-size: 11px;margin-top:-6px;">
     <a href="/admin/chunks/chunk/promo/">promobox</a> |
     <a href="/admin/social/cite">bannery</a> |