From 60e35d3c1b8c5c27fe23b62f70314a97ff5b7cb6 Mon Sep 17 00:00:00 2001 From: tncrdk Date: Thu, 12 Oct 2023 19:57:17 +0200 Subject: [PATCH 1/7] update: updated haystack and imagecropper to be compatible with django-4.0 --- Pipfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pipfile b/Pipfile index 6e856c1c..9606f751 100644 --- a/Pipfile +++ b/Pipfile @@ -9,9 +9,9 @@ django = "==3.2.*" django-braces = "*" # Extra mixinclasses for models and views django-contrib-comments = "*" django-filebrowser-no-grappelli = "*" # Filebrowser for mediafiles. -django-haystack = "==3.0b1" # Search functionality for django models. See whoosh as well +django-haystack = "==3.2" # Search functionality for django models. See whoosh as well django-hitcount = "*" -django-image-cropping = "==1.5" +django-image-cropping = "==1.7" django-markdown-deux = "*" django-sekizai = "*" # Templatetag library for extra block functionality easy-thumbnails = "*" # Thumbnail creator From bef87cc7376c4d0f02de68d3a5a17a01467dcf00 Mon Sep 17 00:00:00 2001 From: tncrdk Date: Thu, 12 Oct 2023 20:04:33 +0200 Subject: [PATCH 2/7] update: updated Pipfile.lock --- Pipfile.lock | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index 052c4afe..9b91723d 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "8147de27d3873fb743bf69d7875ad388e4dafc5975be218792dc26e530b24109" + "sha256": "d857b87a0fae89f7bdfdd75e2ecfbce26baa49cd2e5bc04361060ec9494d8e5f" }, "pipfile-spec": 6, "requires": { @@ -54,6 +54,7 @@ "sha256:c5e7b668025a6e06cad9ba6d4de1fd1a21212acebb51ea34abb400c6e4d33430" ], "index": "pypi", + "markers": "python_version >= '3.6'", "version": "==3.2.22" }, "django-appconf": { @@ -70,6 +71,7 @@ "sha256:6c895cdda58de1360bf82cc9e31014ad158dad680198ac8366ca33c19efa972f" ], "index": "pypi", + "markers": "python_version >= '3.8'", "version": "==23.2" }, "django-braces": { @@ -86,6 +88,7 @@ "sha256:73399fb8f56f565e7519b57adbd7c585623db2cdc8c75666f56918d3eecf7906" ], "index": "pypi", + "markers": "python_version >= '3.8'", "version": "==6.7.0" }, "django-classy-tags": { @@ -121,11 +124,10 @@ }, "django-haystack": { "hashes": [ - "sha256:9dba64f5c76cf147ac382d4a4a270f30d30a45a3a7a1738a9d05c96d18777c07", - "sha256:b83705e1cf8141cd1755fc6683ac65fea4e1281f4b4306bc9224af96495b0df3" + "sha256:f0284b822f866945f8041f091f5e384ae1ccd1152c7ea5a5b09a0b198cc6d4e4" ], "index": "pypi", - "version": "==3.0b1" + "version": "==3.2.0" }, "django-hitcount": { "hashes": [ @@ -137,11 +139,12 @@ }, "django-image-cropping": { "hashes": [ - "sha256:59744e8df88db7e46e37b526fc715fdde665d9efa345922745f50411a6dadb3f", - "sha256:81dbcabb6421c5a1e88fac9d96f336d6109a23dcb8fa6c678329d3688c9973c4" + "sha256:429ad2c3ccad5ddeb079fbee24dc1536105b3e9d30beb53d1446fd560da04d5b", + "sha256:971d1a92c9ef14f1bf95996dd4eeed0a00dbb2221bfa762290d9525696243232" ], "index": "pypi", - "version": "==1.5" + "markers": "python_version >= '3.6'", + "version": "==1.7" }, "django-js-asset": { "hashes": [ @@ -172,6 +175,7 @@ "sha256:87be916dece0dde2da68ef7c5a253cef76e905f264dd1e4d2c8cb8ba55919bea" ], "index": "pypi", + "markers": "python_version >= '3.8'", "version": "==0.7.0" }, "django-node-assets": { @@ -196,6 +200,7 @@ "sha256:f47dee4636b5e44cb46915e14747f043be856f21e5e635a94c48939ed18c783f" ], "index": "pypi", + "markers": "python_version >= '3.7'", "version": "==3.1.1" }, "django-sekizai": { @@ -204,6 +209,7 @@ "sha256:aa12e66ba0335fbe726b7d74cf4e8716b89a0be99a1304a9b9e8b191229e2e4a" ], "index": "pypi", + "markers": "python_version >= '3.8'", "version": "==4.1.0" }, "djangorestframework": { @@ -212,6 +218,7 @@ "sha256:eb63f58c9f218e1a7d064d17a70751f528ed4e1d35547fdade9aaf4cd103fd08" ], "index": "pypi", + "markers": "python_version >= '3.6'", "version": "==3.14.0" }, "easy-thumbnails": { @@ -220,6 +227,7 @@ "sha256:97f5a5278d8b6c1f5b1b7473f3737d29b18f5c1159cbdf0ab28674fdac2f8c87" ], "index": "pypi", + "markers": "python_version >= '3.6'", "version": "==2.8.5" }, "gunicorn": { @@ -228,6 +236,7 @@ "sha256:88ec8bff1d634f98e61b9f65bc4bf3cd918a90806c6f5c48bc5603849ec81033" ], "index": "pypi", + "markers": "python_version >= '3.5'", "version": "==21.2.0" }, "markdown": { @@ -236,6 +245,7 @@ "sha256:c467cd6233885534bf0fe96e62e3cf46cfc1605112356c4f9981512b8174de59" ], "index": "pypi", + "markers": "python_version >= '3.5'", "version": "==3.2.2" }, "markdown2": { @@ -440,6 +450,7 @@ "sha256:8969ec6d763c856f7073c4c64662882675702efcb114b4bcbb955aea3a069fa7" ], "index": "pypi", + "markers": "python_version >= '3.7'", "version": "==1.1.0" }, "pytz": { @@ -527,7 +538,7 @@ "sha256:c9a6efd354c178b3a08c782cc461c9d5e15f9198b20806d16ea86728135e2b96" ], "index": "pypi", - "version": "==0.8.1 " + "version": "==0.8.1" } }, "develop": { @@ -545,6 +556,7 @@ "sha256:bdfc739baa03b880c2d15d0431b31c658ffc348e907fe197e54e0389dd59e11e" ], "index": "pypi", + "markers": "python_version >= '3.7'", "version": "==1.7.5" }, "black": { @@ -573,6 +585,7 @@ "sha256:d6bc09188020c9ac2555a498949401ab35bb6bf76d4e0f8ee251694664df6301" ], "index": "pypi", + "markers": "python_version >= '3.8'", "version": "==23.9.1" }, "cfgv": { @@ -612,15 +625,17 @@ "sha256:bc76d97d1a65bbd9842a6d722882098eb549ec8ee1081f9fb2e8ff29f0c300f1" ], "index": "pypi", + "markers": "python_version >= '3.7'", "version": "==3.3.0" }, "faker": { "hashes": [ - "sha256:5b234b89a9c536a37420f612169b6e58627b823ba1bba2504c0450db3b136620", - "sha256:d86cb3150626bd642c6abd8a64107ddb0b154500252f46a56efe527a50594866" + "sha256:63da90512d0cb3acdb71bd833bb3071cb8a196020d08b8567a01d232954f1820", + "sha256:f321e657ed61616fbfe14dbb9ccc6b2e8282652bbcfcb503c1bd0231ff834df6" ], "index": "pypi", - "version": "==19.8.0" + "markers": "python_version >= '3.8'", + "version": "==19.10.0" }, "filelock": { "hashes": [ @@ -636,6 +651,7 @@ "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907" ], "index": "pypi", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==3.9.2" }, "gitdb": { @@ -668,6 +684,7 @@ "sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2" ], "index": "pypi", + "markers": "python_version < '4.0' and python_full_version >= '3.6.1'", "version": "==5.9.3" }, "lazy-object-proxy": { @@ -850,6 +867,7 @@ "sha256:96d529a951f8b677f730a7212442027e8ba53f9b04d217c4c67dc56c393ad945" ], "index": "pypi", + "markers": "python_version >= '3.8'", "version": "==3.4.0" }, "pycodestyle": { @@ -882,6 +900,7 @@ "sha256:f4fcac7ae74cfe36bc8451e931d8438e4a476c20314b1101c458ad0f05191fad" ], "index": "pypi", + "markers": "python_full_version >= '3.7.2'", "version": "==2.17.7" }, "pylint-django": { From 19f5c852de992a8f411bfa075d5ad0847582c8aa Mon Sep 17 00:00:00 2001 From: tncrdk Date: Thu, 12 Oct 2023 20:14:05 +0200 Subject: [PATCH 3/7] fix: replaced smart_text alias with smart_str. Ref: https://docs.djangoproject.com/en/4.2/releases/3.0/#django-utils-encoding-force-text-and-smart-text --- nablapps/accounts/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nablapps/accounts/admin.py b/nablapps/accounts/admin.py index 6c30acfc..97caf855 100644 --- a/nablapps/accounts/admin.py +++ b/nablapps/accounts/admin.py @@ -11,7 +11,7 @@ from django.contrib.flatpages.models import FlatPage from django.http import HttpResponseRedirect from django.urls import reverse -from django.utils.encoding import smart_text +from django.utils.encoding import smart_str from .forms import NablaUserChangeForm, NablaUserCreationForm from .models import FysmatClass, NablaGroup, NablaUser, RegistrationRequest @@ -30,7 +30,7 @@ class UserFullnameMultipleChoiceField(forms.ModelMultipleChoiceField): """ def label_from_instance(self, obj): - return smart_text(f"{obj.get_full_name()} - {obj.username}") + return smart_str(f"{obj.get_full_name()} - {obj.username}") class GroupAdminForm(forms.ModelForm): From 694abae199bf02a2f5b69421ec5ebf9a93f543e9 Mon Sep 17 00:00:00 2001 From: tncrdk Date: Thu, 12 Oct 2023 20:19:30 +0200 Subject: [PATCH 4/7] update: bumped django to 4.0 --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 9606f751..c2c58847 100644 --- a/Pipfile +++ b/Pipfile @@ -4,7 +4,7 @@ verify_ssl = true name = "pypi" [packages] -django = "==3.2.*" +django = "==4.0.*" # Templatetags for bootstrap3 django-braces = "*" # Extra mixinclasses for models and views django-contrib-comments = "*" From a0a6eb4ac8aefb7616aa887d2de12275e0ca2050 Mon Sep 17 00:00:00 2001 From: tncrdk Date: Thu, 12 Oct 2023 20:23:21 +0200 Subject: [PATCH 5/7] update: updated Pipfile.lock --- Pipfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index 9b91723d..387683f4 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "d857b87a0fae89f7bdfdd75e2ecfbce26baa49cd2e5bc04361060ec9494d8e5f" + "sha256": "1894d28ae0eef3f82575e99e936a5bd478af63baaff96bcf6e1007732313a129" }, "pipfile-spec": 6, "requires": { @@ -50,12 +50,12 @@ }, "django": { "hashes": [ - "sha256:83b6d66b06e484807d778263fdc7f9186d4dc1862fcfa6507830446ac6b060ba", - "sha256:c5e7b668025a6e06cad9ba6d4de1fd1a21212acebb51ea34abb400c6e4d33430" + "sha256:2c2f73c16b11cb272c6d5e3b063f0d1be06f378d8dc6005fbe8542565db659cc", + "sha256:4496eb4f65071578b703fdc6e6f29302553c7440e3f77baf4cefa4a4e091fc3d" ], "index": "pypi", - "markers": "python_version >= '3.6'", - "version": "==3.2.22" + "markers": "python_version >= '3.8'", + "version": "==4.0.10" }, "django-appconf": { "hashes": [ From a22d95799d7c56cf2d7312b5ad9bb0b5fc0ed4b0 Mon Sep 17 00:00:00 2001 From: tncrdk Date: Fri, 13 Oct 2023 21:04:11 +0200 Subject: [PATCH 6/7] fix: replaced ifequal-tags with normal if-tags as per ref: https://docs.djangoproject.com/en/3.2/ref/templates/builtins/#ifequal-and-ifnotequal --- nablapps/events/templates/events/administer_penalties.html | 4 ++-- nablapps/events/templates/events/event_detail.html | 2 +- templates/comments/preview.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nablapps/events/templates/events/administer_penalties.html b/nablapps/events/templates/events/administer_penalties.html index c976d756..fa7dcb79 100644 --- a/nablapps/events/templates/events/administer_penalties.html +++ b/nablapps/events/templates/events/administer_penalties.html @@ -44,9 +44,9 @@

Prikkadministrering for {{ event.headli {% for penalty in event.get_penalty_rule_dict.values %} - + {% endfor %} - + {% if registration.attendance_registration %} Ja diff --git a/nablapps/events/templates/events/event_detail.html b/nablapps/events/templates/events/event_detail.html index a01d53ab..ea3f559c 100644 --- a/nablapps/events/templates/events/event_detail.html +++ b/nablapps/events/templates/events/event_detail.html @@ -23,7 +23,7 @@

PĆ„meldte

{% for registration in event.eventregistration_set.all %} {% with user=registration.user %} - diff --git a/templates/comments/preview.html b/templates/comments/preview.html index d9fa4e84..4e9cd8a5 100644 --- a/templates/comments/preview.html +++ b/templates/comments/preview.html @@ -16,7 +16,7 @@

{% blocktrans count form.errors|length as counter %}Please correct the error {% else %} {% if field.errors %} From cf4594d245aa4f69b92dc1b3e3b7158d3f55f32c Mon Sep 17 00:00:00 2001 From: tncrdk Date: Fri, 13 Oct 2023 21:45:43 +0200 Subject: [PATCH 7/7] add: added tzdata to dependency-list because python on windows does not ship it by default --- Pipfile | 1 + Pipfile.lock | 48 ++++++++++++++++++++++-------------------------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/Pipfile b/Pipfile index c2c58847..5bf03426 100644 --- a/Pipfile +++ b/Pipfile @@ -27,6 +27,7 @@ django-multi-email-field = "*" django-bootstrap4 = "*" django-ckeditor = "*" djangorestframework = "*" +tzdata = "*" # django-4.* uses zoneinfo, which in turn relies on tzdata. On windows tzdata is as of now ()13.10.2023) not installed by default [dev-packages] pre-commit = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 387683f4..5188827b 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "1894d28ae0eef3f82575e99e936a5bd478af63baaff96bcf6e1007732313a129" + "sha256": "fe7bc0895f042b22ef96489b12f17b225d0f76f06d477f85a61d7c666f46452b" }, "pipfile-spec": 6, "requires": { @@ -54,7 +54,6 @@ "sha256:4496eb4f65071578b703fdc6e6f29302553c7440e3f77baf4cefa4a4e091fc3d" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==4.0.10" }, "django-appconf": { @@ -71,7 +70,6 @@ "sha256:6c895cdda58de1360bf82cc9e31014ad158dad680198ac8366ca33c19efa972f" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==23.2" }, "django-braces": { @@ -88,7 +86,6 @@ "sha256:73399fb8f56f565e7519b57adbd7c585623db2cdc8c75666f56918d3eecf7906" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==6.7.0" }, "django-classy-tags": { @@ -127,7 +124,7 @@ "sha256:f0284b822f866945f8041f091f5e384ae1ccd1152c7ea5a5b09a0b198cc6d4e4" ], "index": "pypi", - "version": "==3.2.0" + "version": "==3.2" }, "django-hitcount": { "hashes": [ @@ -143,7 +140,6 @@ "sha256:971d1a92c9ef14f1bf95996dd4eeed0a00dbb2221bfa762290d9525696243232" ], "index": "pypi", - "markers": "python_version >= '3.6'", "version": "==1.7" }, "django-js-asset": { @@ -175,7 +171,6 @@ "sha256:87be916dece0dde2da68ef7c5a253cef76e905f264dd1e4d2c8cb8ba55919bea" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==0.7.0" }, "django-node-assets": { @@ -200,7 +195,6 @@ "sha256:f47dee4636b5e44cb46915e14747f043be856f21e5e635a94c48939ed18c783f" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==3.1.1" }, "django-sekizai": { @@ -209,7 +203,6 @@ "sha256:aa12e66ba0335fbe726b7d74cf4e8716b89a0be99a1304a9b9e8b191229e2e4a" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==4.1.0" }, "djangorestframework": { @@ -218,7 +211,6 @@ "sha256:eb63f58c9f218e1a7d064d17a70751f528ed4e1d35547fdade9aaf4cd103fd08" ], "index": "pypi", - "markers": "python_version >= '3.6'", "version": "==3.14.0" }, "easy-thumbnails": { @@ -227,7 +219,6 @@ "sha256:97f5a5278d8b6c1f5b1b7473f3737d29b18f5c1159cbdf0ab28674fdac2f8c87" ], "index": "pypi", - "markers": "python_version >= '3.6'", "version": "==2.8.5" }, "gunicorn": { @@ -236,7 +227,6 @@ "sha256:88ec8bff1d634f98e61b9f65bc4bf3cd918a90806c6f5c48bc5603849ec81033" ], "index": "pypi", - "markers": "python_version >= '3.5'", "version": "==21.2.0" }, "markdown": { @@ -245,7 +235,6 @@ "sha256:c467cd6233885534bf0fe96e62e3cf46cfc1605112356c4f9981512b8174de59" ], "index": "pypi", - "markers": "python_version >= '3.5'", "version": "==3.2.2" }, "markdown2": { @@ -450,7 +439,6 @@ "sha256:8969ec6d763c856f7073c4c64662882675702efcb114b4bcbb955aea3a069fa7" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==1.1.0" }, "pytz": { @@ -508,6 +496,14 @@ "markers": "python_version < '3.11'", "version": "==4.8.0" }, + "tzdata": { + "hashes": [ + "sha256:11ef1e08e54acb0d4f95bdb1be05da659673de4acbd21bf9c69e94cc5e907a3a", + "sha256:7e65763eef3120314099b6939b5546db7adce1e7d6f2e179e3df563c70511eda" + ], + "index": "pypi", + "version": "==2023.3" + }, "wand": { "hashes": [ "sha256:1b77e25439ace57f665d1ccc6cff2766fad0834005b89ae3e7aaf3ba12b124b0", @@ -538,7 +534,7 @@ "sha256:c9a6efd354c178b3a08c782cc461c9d5e15f9198b20806d16ea86728135e2b96" ], "index": "pypi", - "version": "==0.8.1" + "version": "==0.8.1 " } }, "develop": { @@ -556,7 +552,6 @@ "sha256:bdfc739baa03b880c2d15d0431b31c658ffc348e907fe197e54e0389dd59e11e" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==1.7.5" }, "black": { @@ -585,7 +580,6 @@ "sha256:d6bc09188020c9ac2555a498949401ab35bb6bf76d4e0f8ee251694664df6301" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==23.9.1" }, "cfgv": { @@ -604,6 +598,14 @@ "markers": "python_version >= '3.7'", "version": "==8.1.7" }, + "colorama": { + "hashes": [ + "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", + "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6" + ], + "markers": "platform_system == 'Windows'", + "version": "==0.4.6" + }, "dill": { "hashes": [ "sha256:76b122c08ef4ce2eedcd4d1abd8e641114bfc6c2867f49f3c41facf65bf19f5e", @@ -625,7 +627,6 @@ "sha256:bc76d97d1a65bbd9842a6d722882098eb549ec8ee1081f9fb2e8ff29f0c300f1" ], "index": "pypi", - "markers": "python_version >= '3.7'", "version": "==3.3.0" }, "faker": { @@ -634,7 +635,6 @@ "sha256:f321e657ed61616fbfe14dbb9ccc6b2e8282652bbcfcb503c1bd0231ff834df6" ], "index": "pypi", - "markers": "python_version >= '3.8'", "version": "==19.10.0" }, "filelock": { @@ -651,7 +651,6 @@ "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907" ], "index": "pypi", - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==3.9.2" }, "gitdb": { @@ -684,7 +683,6 @@ "sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2" ], "index": "pypi", - "markers": "python_version < '4.0' and python_full_version >= '3.6.1'", "version": "==5.9.3" }, "lazy-object-proxy": { @@ -863,12 +861,11 @@ }, "pre-commit": { "hashes": [ - "sha256:6bbd5129a64cad4c0dfaeeb12cd8f7ea7e15b77028d985341478c8af3c759522", - "sha256:96d529a951f8b677f730a7212442027e8ba53f9b04d217c4c67dc56c393ad945" + "sha256:5804465c675b659b0862f07907f96295d490822a450c4c40e747d0b1c6ebcb32", + "sha256:841dc9aef25daba9a0238cd27984041fa0467b4199fc4852e27950664919f660" ], "index": "pypi", - "markers": "python_version >= '3.8'", - "version": "==3.4.0" + "version": "==3.5.0" }, "pycodestyle": { "hashes": [ @@ -900,7 +897,6 @@ "sha256:f4fcac7ae74cfe36bc8451e931d8438e4a476c20314b1101c458ad0f05191fad" ], "index": "pypi", - "markers": "python_full_version >= '3.7.2'", "version": "==2.17.7" }, "pylint-django": {