Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Django 2.2 #1770

Merged
merged 3 commits into from
Jan 27, 2020
Merged

Upgrade to Django 2.2 #1770

merged 3 commits into from
Jan 27, 2020

Conversation

DavisRayM
Copy link
Contributor

@DavisRayM DavisRayM commented Jan 21, 2020

Changes / Features implemented

  • Upgraded the Django version to 2.2

Steps taken to verify this change does what is intended

  • Tested locally
  • Tested on travis

Side effects of implementing this change

  • Full QA may need to be done. In case something bypassed our tests.

Closes #1769

@@ -83,6 +83,9 @@ def test_manager_can_update_xform(self):

self.assertFalse(self.xform.shared)

data.pop('enketo_preview_url')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is related to this issue here

Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense. Do we add the link - https://code.djangoproject.com/ticket/30024 - as a comment just above the <obj>.pop('<key>') so that in future, we can easily know why we had to do this?

Copy link
Contributor Author

@DavisRayM DavisRayM Jan 22, 2020

Choose a reason for hiding this comment

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

Yes, I'll add a link. In case someone works on the code later on.

@@ -35,14 +35,13 @@ def get_password_reset_email(user, reset_url,
"""Creates the subject and email body for password reset email."""
result = urlparse(reset_url)
site_name = domain = result.hostname
encoded_username = urlsafe_base64_encode(
b(user.username.encode('utf-8'))).decode('utf-8')
encoded_username = urlsafe_base64_encode(b(user.username.encode('utf-8')))
Copy link
Contributor Author

@DavisRayM DavisRayM Jan 21, 2020

Choose a reason for hiding this comment

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

Changed this because urlsafe_base64_encode now returns a string instead of a bytestring.

ivermac
ivermac previously approved these changes Jan 22, 2020
@@ -83,6 +83,9 @@ def test_manager_can_update_xform(self):

self.assertFalse(self.xform.shared)

data.pop('enketo_preview_url')
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes sense. Do we add the link - https://code.djangoproject.com/ticket/30024 - as a comment just above the <obj>.pop('<key>') so that in future, we can easily know why we had to do this?

ukanga
ukanga previously approved these changes Jan 22, 2020
@DavisRayM DavisRayM added the QA- PR failed QA testing label Jan 22, 2020
@DavisRayM
Copy link
Contributor Author

Using the QA- label to signify this PR needs to go through QA.

- Gdal 1.10 and 1.9 is no longer supported by Django v2.2
- The function `urlsafe_base64_encode` as of django 2.2 returns strings instead of bytestring
@WNjihia WNjihia added QA+ PR passed QA testing and removed QA- PR failed QA testing labels Jan 27, 2020
Copy link
Contributor

@ivermac ivermac left a comment

Choose a reason for hiding this comment

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

lgtm!

@DavisRayM DavisRayM merged commit f19c8d4 into master Jan 27, 2020
@DavisRayM DavisRayM deleted the 1769-upgrade-django-2.2 branch January 27, 2020 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA+ PR passed QA testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Django version
4 participants