-
-
Notifications
You must be signed in to change notification settings - Fork 112
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 Django to 1.11 [One Step at a time] #135
Conversation
@prshnt19 has done some work with Django for SymPy Live sympy/sympy-live#144. Perhaps you can review each other's work. I can also give you access to push up to the App Engine if you need it. |
Co-Authored-By: Aaron Meurer <asmeurer@gmail.com>
@asmeurer Sure, sounds great! |
@prshnt19 Can you please have a look at this PR? |
except DeadlineExceededError: | ||
return HttpResponse(json.dumps({ | ||
'error': 'Computation timed out.' | ||
}), mimetype="application/json") | ||
}), content_type="application/json") |
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.
I think its better to use JsonResponse.
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.
Beyond the scope, See this
@@ -381,12 +382,14 @@ def remove_query(request, qid): | |||
'message': 'Not logged in or invalid user.' | |||
} | |||
|
|||
return HttpResponse(json.dumps(response), mimetype='application/json') | |||
return HttpResponse(json.dumps(response), content_type='application/json') |
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.
return HttpResponse(json.dumps(response), content_type='application/json') | |
return JsonResponse(response) |
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.
Beyond the scope, See this
settings.py
Outdated
}] | ||
|
||
|
||
ALLOWED_HOSTS = ['127.0.0.1', 'localhost'] |
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.
Allowed hosts should contain the domain 'https://sympygamma.com' for production.
@@ -26,6 +26,8 @@ handlers: | |||
|
|||
libraries: | |||
- name: django | |||
version: "1.3" | |||
version: "1.11" | |||
- name: numpy | |||
version: "1.6.1" |
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.
version: "1.6.1" | |
version: "1.18.1" |
I think numpy should be updated to latest.
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.
Beyond the scope, See this
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.
@aktech I think instead of Python2 we should use Python3. Python2 support is already dropped for SymPy.
@prshnt19 Thanks for the review. This is beyond the scope of this PR. The plan is to do incremental working updates. See this comment. This PR only contains minimum amount of changes required to support Django 1.11, following PR could contain upgrading further versions incrementally. |
Well, I only have doubts for python2. Other than that changes look fine to me |
This is an attempt to prepare for Python3 upgrade. It will happen incrementally. |
SymPy Gamma is also hosted at gamma.sympy.org |
Updated |
Upgrading everything to latest version in one go is not a great idea and will be hard to review as well, I am planning to upgrading things slowly and one by one so that the diff is not a lot.
@asmeurer @certik @lidavidm