Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Upgrade to django42 #1341

Merged
merged 16 commits into from
Apr 3, 2024
Merged

Upgrade to django42 #1341

merged 16 commits into from
Apr 3, 2024

Conversation

sebgrebe
Copy link
Collaborator

@sebgrebe sebgrebe commented Apr 1, 2024

Changes because of upgrade to Django 4.2:

  • Upgrades to Django 4.2
  • Upgrades docker-compose to use Postgres 13
  • Replaces django_pwned_passwords with pwned-passwords-django as the other was no longer working after django upgrade
  • Adds crispy-bootstrap3 (needed with v2 of Django-crispy-forms)
  • Fixes DateRangeFilter import
  • Fixes loading recaptcha package
  • Uses django.urls.re_path instead of url (depracated)
  • Fixes ordering of group organisers: by last_name, not name
  • Fixes initialisation of Selenium WebDriver
  • Adds pytest.ini (selenium was failing after upgrade because it was missing)
  • Replaces usage of django-cmshelpers send_email method (no longer maintained) with Django's default method
  • Added command load_seed_data
    • Adds an instance of SocialApp if in local or test environment to ensure that website can load
    • Without such an instance, the provide_login_url template tag was throwing an error. Came after upgrading to 0.60

Changes to functionality: Groups page

  • Removes table.js as it has outdated JS dependencies, which are a pain to keep updated
  • This breaks the /groups page though. The page is no longer used, however, but immediately redirected to CEA's community page
  • So if in the future /groups should be reinstantiated, either tables.js needs to be brought back or some other, new code used

Other changes

  • Upgrades docker container to node18 because node14 is no longer supported
    • Added NODE_OPTIONS=--openssl-legacy-provider to npm run build, which is needed with node18
  • Upgrades Sentry
  • Local groups tests: compares querysets by elements, not count
  • Fixes reference of django-sluggable to specific commit in requirements.in (not .txt)

)
email.attach_alternative(html_msg, "text/html")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't work as it's not EmailMultiAlternatives

@@ -0,0 +1,48 @@
# Generated by Django 3.2.15 on 2024-03-31 14:57
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

django 3.2? Can this be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with localgroups

@@ -10,6 +10,9 @@ def test_signup(self):
user_email = "[email protected]"
user_password = "Wa4@;fh>A/~W#6SH"

print("LIVE SERVER URL")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm

Copy link
Collaborator Author

@sebgrebe sebgrebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sebgrebe sebgrebe merged commit 62f635b into default Apr 3, 2024
1 check passed
@sebgrebe sebgrebe changed the title Upgrade do django42 Upgrade to django42 Apr 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant