-
Notifications
You must be signed in to change notification settings - Fork 1
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
Task/sapnamysore/tlt 3253/upgrade django #44
Changes from 3 commits
70d06be
945cbaa
5df17e1
045d12b
2f81f39
521bdc4
8836bd8
0c58121
96d3d81
41c28a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
boto3==1.4.4 | ||
Django==1.9.12 | ||
cx-Oracle==5.2.1 | ||
Django==1.11.9 | ||
cx-Oracle==6.0.3 | ||
django-cached-authentication-middleware==0.2.1 | ||
django-redis-cache==1.7.1 | ||
hiredis==0.2.0 | ||
kitchen==1.2.4 | ||
ndg-httpsclient==0.4.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you mind removing the |
||
redis==2.10.5 | ||
psycopg2==2.6.2 | ||
redis==2.10.6 | ||
psycopg2==2.7.3.2 | ||
requests==2.13.0 | ||
|
||
git+ssh://[email protected]/penzance/[email protected]#egg=canvas-python-sdk==0.8.4 | ||
git+ssh://[email protected]/Harvard-University-iCommons/[email protected]#egg=django-auth-lti==1.2.5 | ||
git+ssh://[email protected]/Harvard-University-iCommons/[email protected]#egg=django-icommons-common[async]==1.18.2 | ||
git+ssh://[email protected]/Harvard-University-iCommons/[email protected]#egg=django-icommons-ui==1.3.1 | ||
git+ssh://[email protected]/Harvard-University-iCommons/[email protected]#egg=django-canvas-lti-school-permissions==0.5.2 | ||
git+ssh://[email protected]/penzance/[email protected]#egg=canvas-python-sdk==0.10.2 | ||
git+ssh://[email protected]/Harvard-University-iCommons/[email protected]#egg=django-auth-lti==1.2.9 | ||
|
||
# NOTE: Including the django-pgjson library here. This is required by 'async' within django-icommons-common, but | ||
# there is fix for a bug for django<=1.10 , thgat is still in a commit but is not in the released version. Unable to specify | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor spelling error for |
||
# a commit in the django-icommons-common's setup.py, hence including it in the consuming app till we used switch from pjson to standard json | ||
git+ssh://[email protected]/djangonauts/django-pgjson.git@30463d210a42b2de#egg=django-pgjson | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This version of pgjson uses import_by_path which is deprecated in Django 1.10+. Causes the deploy to fail. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Chris-Thornton-Harvard : So the latest Release (tagged 0.31) of django-pgjson from July 2015 ((https://github.com/djangonauts/django-pgjson/releases/tag/0.3.1) uses the deprecated import_by_path. The second link you have is the reported issue, but is still open. I found the link to this particular commit - which a workaround to this issue(Details in the last comment here djangonauts/django-pgjson#43 ), it has been merged to master but not ben tagged. It worked locally for me, will check why it's failing while we deploy to dev. Thanks for catching it. |
||
git+ssh://[email protected]/Harvard-University-iCommons/[email protected]#egg=django-icommons-common[async]==1.33.1 | ||
git+ssh://[email protected]/Harvard-University-iCommons/[email protected]#egg=django-icommons-ui==1.5.2 | ||
git+ssh://[email protected]/Harvard-University-iCommons/[email protected]#egg=django-canvas-lti-school-permissions==0.6 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from django.conf.urls import include, url | ||
from django.conf import settings | ||
|
||
from canvas_manage_course import views | ||
from icommons_ui import views as icommons_ui_views | ||
|
@@ -15,3 +16,9 @@ | |
url(r'^not_authorized$', icommons_ui_views.not_authorized, name='not_authorized'), | ||
url(r'^tool_config$', views.tool_config, name='tool_config'), | ||
] | ||
|
||
if settings.DEBUG: | ||
import debug_toolbar | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add put this in a try/except block? We normally don't require the toolbar in our aws environments, although we might want to run in |
||
urlpatterns += [ | ||
url(r'^__debug__/', include(debug_toolbar.urls)), | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
import logging | ||
|
||
from django.contrib.auth.decorators import login_required | ||
from django.core.urlresolvers import reverse | ||
from django.urls import reverse | ||
|
||
from django.http import HttpResponse | ||
from django.shortcuts import redirect, render | ||
from django.views.decorators.csrf import csrf_exempt | ||
|
@@ -21,8 +22,14 @@ | |
|
||
@require_http_methods(['GET']) | ||
def tool_config(request): | ||
url = "%s://%s%s" % (request.scheme, request.get_host(), | ||
reverse('lti_launch', exclude_resource_link_id=True)) | ||
|
||
if request.is_secure(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW, for our hosted apps, this will always be true since we have a redirect in nginx from http to https. |
||
host = 'https://' + request.get_host() | ||
else: | ||
host = 'http://' + request.get_host() | ||
|
||
url = host + reverse('lti_launch') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would think that we'd always want our tool launch urls (this one, at least) to be over ssl. IIRC, Canvas prefers/demands that LTI tools be running over secure connections - maybe it's actually browsers that enforce that due to mixed content warnings/errors. In any case, I'd be tempted to simply make the url There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This works, although using string formatting reads better to me because I can more easily visualize the resulting string. That said, it's equivalent to the concats in place so no pressure to change: |
||
|
||
title = 'Manage Course' | ||
lti_tool_config = ToolConfig( | ||
title=title, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version of cx_Oracle is now 6.1 I believe