From a6f9f0a8d02d483c9d745be210987eb493cd4829 Mon Sep 17 00:00:00 2001 From: Mara Karagianni Date: Mon, 5 Feb 2024 16:02:53 +0200 Subject: [PATCH] deps: django upgrade to 4.0 --- adhocracy-plus/config/settings/base.py | 1 - adhocracy-plus/config/settings/dev.py | 2 +- adhocracy-plus/config/settings/travis.py | 2 +- adhocracy-plus/config/urls.py | 36 +++++++++---------- .../includes/userdashboard_mobile_toggle.html | 2 +- apps/account/__init__.py | 1 - apps/actions/__init__.py | 1 - apps/activities/__init__.py | 1 - apps/budgeting/__init__.py | 1 - ...proposal_item_ptr_alter_proposal_labels.py | 36 +++++++++++++++++++ apps/captcha/__init__.py | 1 - apps/cms/contacts/__init__.py | 1 - apps/cms/images/__init__.py | 1 - apps/cms/news/__init__.py | 1 - apps/cms/pages/__init__.py | 1 - apps/cms/settings/__init__.py | 1 - apps/cms/use_cases/__init__.py | 1 - apps/contrib/__init__.py | 1 - apps/dashboard/__init__.py | 2 -- apps/dashboard/views.py | 4 +-- apps/debate/__init__.py | 1 - apps/documents/__init__.py | 1 - apps/exports/__init__.py | 1 - apps/ideas/__init__.py | 1 - ...3_alter_idea_item_ptr_alter_idea_labels.py | 36 +++++++++++++++++++ apps/ideas/views.py | 4 +-- apps/interactiveevents/__init__.py | 1 - apps/mapideas/__init__.py | 1 - ...r_mapidea_item_ptr_alter_mapidea_labels.py | 36 +++++++++++++++++++ apps/maps/__init__.py | 1 - apps/moderatorfeedback/__init__.py | 1 - apps/moderatorremark/__init__.py | 1 - apps/newsletters/__init__.py | 1 - apps/notifications/__init__.py | 1 - apps/offlineevents/__init__.py | 1 - apps/offlineevents/views.py | 4 +-- apps/organisations/__init__.py | 1 - apps/polls/__init__.py | 1 - apps/projects/__init__.py | 1 - apps/projects/admin.py | 8 ++--- apps/projects/views.py | 4 +-- apps/topicprio/__init__.py | 1 - ...alter_topic_item_ptr_alter_topic_labels.py | 36 +++++++++++++++++++ .../base_userdashboard.html | 2 +- apps/users/__init__.py | 2 -- apps/users/utils.py | 10 +++--- changelog/7637.md | 13 +++++++ package.json | 2 +- requirements/base.txt | 4 +-- tests/projects/test_serializers.py | 11 +++--- 50 files changed, 203 insertions(+), 82 deletions(-) create mode 100644 apps/budgeting/migrations/0003_alter_proposal_item_ptr_alter_proposal_labels.py create mode 100644 apps/ideas/migrations/0003_alter_idea_item_ptr_alter_idea_labels.py create mode 100644 apps/mapideas/migrations/0003_alter_mapidea_item_ptr_alter_mapidea_labels.py create mode 100644 apps/topicprio/migrations/0003_alter_topic_item_ptr_alter_topic_labels.py create mode 100644 changelog/7637.md diff --git a/adhocracy-plus/config/settings/base.py b/adhocracy-plus/config/settings/base.py index 046a9ddc3c..6bba70d1d9 100644 --- a/adhocracy-plus/config/settings/base.py +++ b/adhocracy-plus/config/settings/base.py @@ -182,7 +182,6 @@ USE_I18N = True -USE_L10N = True USE_TZ = True diff --git a/adhocracy-plus/config/settings/dev.py b/adhocracy-plus/config/settings/dev.py index c641bcc26d..95fb35f4ad 100644 --- a/adhocracy-plus/config/settings/dev.py +++ b/adhocracy-plus/config/settings/dev.py @@ -26,7 +26,7 @@ if os.getenv("DATABASE") == "postgresql": DATABASES = { "default": { - "ENGINE": "django.db.backends.postgresql_psycopg2", + "ENGINE": "django.db.backends.postgresql", "NAME": "django", "USER": "django", "PASSWORD": "", diff --git a/adhocracy-plus/config/settings/travis.py b/adhocracy-plus/config/settings/travis.py index 9a80ef3b04..858051b8bb 100644 --- a/adhocracy-plus/config/settings/travis.py +++ b/adhocracy-plus/config/settings/travis.py @@ -2,7 +2,7 @@ DATABASES = { "default": { - "ENGINE": "django.db.backends.postgresql_psycopg2", + "ENGINE": "django.db.backends.postgresql", "USER": "postgres", "NAME": "django", "TEST": {"NAME": "django_test"}, diff --git a/adhocracy-plus/config/urls.py b/adhocracy-plus/config/urls.py index 501076c0f8..281f070d45 100644 --- a/adhocracy-plus/config/urls.py +++ b/adhocracy-plus/config/urls.py @@ -90,21 +90,21 @@ urlpatterns = [ # General platform urls re_path(r"^django-admin/", admin.site.urls), - re_path(r"^admin/", include("wagtail.admin.urls")), - re_path(r"^documents/", include(wagtaildocs_urls)), - re_path(r"^accounts/", include("allauth.urls")), - re_path(r"^account/", include("apps.account.urls")), - re_path(r"^profile/", include("apps.users.urls")), - re_path(r"^userdashboard/", include("apps.userdashboard.urls")), - re_path(r"^i18n/", include(i18n)), + path("admin/", include("wagtail.admin.urls")), + path("documents/", include(wagtaildocs_urls)), + path("accounts/", include("allauth.urls")), + path("account/", include("apps.account.urls")), + path("profile/", include("apps.users.urls")), + path("userdashboard/", include("apps.userdashboard.urls")), + path("i18n/", include(i18n)), # API urls - re_path(r"^api/", include(ct_router.urls)), - re_path(r"^api/", include(module_router.urls)), - re_path(r"^api/", include(orga_router.urls)), - re_path(r"^api/", include(likes_router.urls)), - re_path(r"^api/", include(comment_router.urls)), - re_path(r"^api/", include(moderation_router.urls)), - re_path(r"^api/", include(router.urls)), + path("api/", include(ct_router.urls)), + path("api/", include(module_router.urls)), + path("api/", include(orga_router.urls)), + path("api/", include(likes_router.urls)), + path("api/", include(comment_router.urls)), + path("api/", include(moderation_router.urls)), + path("api/", include(router.urls)), re_path(r"^api/login", obtain_auth_token, name="api-login"), re_path(r"^api/account/", AccountViewSet.as_view(), name="api-account"), re_path( @@ -115,8 +115,8 @@ never_cache(user_is_project_admin(ck_views.browse)), name="ckeditor_browse", ), - re_path(r"^components/$", contrib_views.ComponentLibraryView.as_view()), - re_path(r"^jsi18n/$", JavaScriptCatalog.as_view(), name="javascript-catalog"), + path("components/", contrib_views.ComponentLibraryView.as_view()), + path("jsi18n/", JavaScriptCatalog.as_view(), name="javascript-catalog"), re_path( r"^(?P[-\w_]+)/", include( @@ -216,6 +216,6 @@ # generic patterns at the very end urlpatterns += [ - re_path(r"", include("apps.organisations.urls")), - re_path(r"", include("wagtail.urls")), + path("", include("apps.organisations.urls")), + path("", include("wagtail.urls")), ] diff --git a/adhocracy-plus/templates/includes/userdashboard_mobile_toggle.html b/adhocracy-plus/templates/includes/userdashboard_mobile_toggle.html index f727d9f666..11705cd617 100644 --- a/adhocracy-plus/templates/includes/userdashboard_mobile_toggle.html +++ b/adhocracy-plus/templates/includes/userdashboard_mobile_toggle.html @@ -29,7 +29,7 @@ {% else %}