Skip to content

Commit

Permalink
Update needed for Django 4.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan-CTL committed Aug 1, 2023
1 parent 7184b45 commit a16ecb8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
2.4.0
2.5.0 (2023-08-01)
====================
* Prioritize urllib.parse.quote import over deprecated django.utils.http.urlquote

2.4.0 (2023-08-01)
====================
* Removed django-jenkins

Expand Down
10 changes: 7 additions & 3 deletions courseaffils/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
from django.views.generic.edit import CreateView
from django.views.generic.list import ListView
from django.utils import timezone
from django.utils.http import urlquote
from django.http import HttpResponseForbidden, HttpResponse
from django.contrib.auth.models import User

try:
from urllib.parse import quote
except ImportError:
from django.utils.http import urlquote as quote


SESSION_KEY = 'ccnmtl.courseaffils.course'

Expand Down Expand Up @@ -130,7 +134,7 @@ def get_context_data(self, **kwargs):
if 'QUERY_STRING' in self.request.META \
and 'unset_course' not in self.request.GET:
# just GET (until someone complains)
escaped_path = urlquote(self.request.get_full_path())
escaped_path = quote(self.request.get_full_path())
next_redirect = '&next=' + escaped_path

context.update({
Expand Down Expand Up @@ -173,7 +177,7 @@ def select_course(request):
and 'unset_course' not in request.GET:
# just GET (until someone complains)
response_dict['next_redirect'] = '&next=%s' % (
urlquote(request.get_full_path()))
quote(request.get_full_path()))

return render(request, 'courseaffils/select_course.html',
response_dict)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from setuptools import setup, find_packages

version = '2.3.0'
version = '2.5.0'


setup(
name='django-courseaffils',
version=version,
description="course affiliations",
long_description="a django app which manages course information",
long_description="A django app which manages course information.",
classifiers=[],
keywords='',
author='Columbia University\'s Center for Teaching and Learning',
Expand Down

0 comments on commit a16ecb8

Please sign in to comment.