Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2c788133
Commit
2c788133
authored
Mar 10, 2016
by
John Eskew
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11768 from edx/jeskew/upgrade_to_django_1_8_11
Upgrade to Django 1.8.11.
parents
a647169a
812aa638
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
37 deletions
+3
-37
cms/startup.py
+1
-3
common/djangoapps/monkey_patch/django_utils_http_is_safe_url.py
+0
-30
lms/startup.py
+1
-3
requirements/edx/base.txt
+1
-1
No files found.
cms/startup.py
View file @
2c788133
...
@@ -11,8 +11,7 @@ from openedx.core.lib.django_startup import autostartup
...
@@ -11,8 +11,7 @@ from openedx.core.lib.django_startup import autostartup
import
django
import
django
from
monkey_patch
import
(
from
monkey_patch
import
(
third_party_auth
,
third_party_auth
,
django_db_models_options
,
django_db_models_options
django_utils_http_is_safe_url
)
)
import
xmodule.x_module
import
xmodule.x_module
...
@@ -27,7 +26,6 @@ def run():
...
@@ -27,7 +26,6 @@ def run():
"""
"""
third_party_auth
.
patch
()
third_party_auth
.
patch
()
django_db_models_options
.
patch
()
django_db_models_options
.
patch
()
django_utils_http_is_safe_url
.
patch
()
# Comprehensive theming needs to be set up before django startup,
# Comprehensive theming needs to be set up before django startup,
# because modifying django template paths after startup has no effect.
# because modifying django template paths after startup has no effect.
...
...
common/djangoapps/monkey_patch/django_utils_http_is_safe_url.py
deleted
100644 → 0
View file @
a647169a
"""
Monkey patch the is_safe_url method in django.utils.http for Django 1.8.10.
In that release, the method crashes when a bytestring, non-unicode string is passed-in
as the url.
Remove the monkey patch when the bug is fixed in a Django 1.8 release. Here's the bug:
https://code.djangoproject.com/ticket/26308
"""
from
django.utils
import
http
from
django.utils.encoding
import
force_text
def
patch
():
"""
Monkey patch the django.utils.http.is_safe_url function to convert the incoming
url and host parameters to unicode.
"""
def
create_is_safe_url_wrapper
(
wrapped_func
):
# pylint: disable=missing-docstring
def
_wrap_is_safe_url
(
*
args
,
**
kwargs
):
def
_conv_text
(
value
):
return
None
if
value
is
None
else
force_text
(
value
)
return
wrapped_func
(
# Converted *args.
*
tuple
(
map
(
_conv_text
,
args
)),
# Converted **kwargs.
**
{
key
:
_conv_text
(
value
)
for
key
,
value
in
kwargs
.
items
()}
)
return
_wrap_is_safe_url
http
.
is_safe_url
=
create_is_safe_url_wrapper
(
http
.
is_safe_url
)
lms/startup.py
View file @
2c788133
...
@@ -14,8 +14,7 @@ import logging
...
@@ -14,8 +14,7 @@ import logging
import
analytics
import
analytics
from
monkey_patch
import
(
from
monkey_patch
import
(
third_party_auth
,
third_party_auth
,
django_db_models_options
,
django_db_models_options
django_utils_http_is_safe_url
)
)
import
xmodule.x_module
import
xmodule.x_module
...
@@ -33,7 +32,6 @@ def run():
...
@@ -33,7 +32,6 @@ def run():
"""
"""
third_party_auth
.
patch
()
third_party_auth
.
patch
()
django_db_models_options
.
patch
()
django_db_models_options
.
patch
()
django_utils_http_is_safe_url
.
patch
()
# To override the settings before executing the autostartup() for python-social-auth
# To override the settings before executing the autostartup() for python-social-auth
if
settings
.
FEATURES
.
get
(
'ENABLE_THIRD_PARTY_AUTH'
,
False
):
if
settings
.
FEATURES
.
get
(
'ENABLE_THIRD_PARTY_AUTH'
,
False
):
...
...
requirements/edx/base.txt
View file @
2c788133
...
@@ -32,7 +32,7 @@ django-method-override==0.1.0
...
@@ -32,7 +32,7 @@ django-method-override==0.1.0
# We need a fix to DRF 3.2.x, for now use it from our own cherry-picked repo
# We need a fix to DRF 3.2.x, for now use it from our own cherry-picked repo
#djangorestframework>=3.1,<3.2
#djangorestframework>=3.1,<3.2
git+https://github.com/edx/django-rest-framework.git@3c72cb5ee5baebc4328947371195eae2077197b0#egg=djangorestframework==3.2.3
git+https://github.com/edx/django-rest-framework.git@3c72cb5ee5baebc4328947371195eae2077197b0#egg=djangorestframework==3.2.3
django==1.8.1
0
django==1.8.1
1
djangorestframework-jwt==1.7.2
djangorestframework-jwt==1.7.2
djangorestframework-oauth==1.1.0
djangorestframework-oauth==1.1.0
edx-django-oauth2-provider==0.5.0
edx-django-oauth2-provider==0.5.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment