-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Django 1.10 support. #4158
Django 1.10 support. #4158
Conversation
@@ -635,6 +635,7 @@ def get_context(self, data, accepted_media_type, renderer_context): | |||
'view': view, | |||
'request': request, | |||
'response': response, | |||
'user': request.user, |
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.
Is this needed by Django 1.10 ?
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.
For one reason or another, yes.
I've not dug into why yet, but presumably we were previously having it automatically included by the RequestContext
. I assume that we could also change our settings in order to resolve this (eg perhaps context processor configuration has moved to being part of the TEMPLATES
dictionary?)
In any case it's probably best that we pass it explicitly, rather than relying on the correct context processors being set.
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.
Verified. Previously we were relying on the default value of TEMPLATE_CONTEXT_PROCESSORS
, which includes django.contrib.auth.context_processors.auth
.
We could add this in to the TEMPLATES.OPTIONS.context_processors
in conftest.py
, which would resolve our test cases, but it's better if we pass it explicitly, and not rely on the user settings.
Current coverage is 91.47%@@ master #4158 diff @@
==========================================
Files 51 51
Lines 5483 5487 +4
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 5016 5019 +3
- Misses 467 468 +1
Partials 0 0
|
There's an outstanding issue, downstream in django-filters, which uses
In the meantime there's no reason not to merge this now, as it resolves almost all our issues, and the remaining failure is in the "expected failures" matrix. |
I'll pick that up. |
👍 Let me know if you want some of my time, too. |
Only if it's hard. :-) — It should be OK. |
DRF 3.4.7 is the same version run by edx/credentials. Release notes are at http://www.django-rest-framework.org/topics/release-notes/#34x-series. Highlights include: support for Django 1.10 (encode/django-rest-framework#4158 - sigh), support for schema generation (encode/django-rest-framework#4179 - required for newer versions of django-rest-swagger), and a change that prevents paginated views from re-running queries when count queries return 0 (encode/django-rest-framework#4201 - this explains the expected query count changes made in tests). LEARNER-1590
DRF 3.4.7 is the same version run by edx/credentials. Release notes are at http://www.django-rest-framework.org/topics/release-notes/#34x-series. Highlights include: - [Support for Django 1.10](encode/django-rest-framework#4158) - sigh - [Support for schema generation](encode/django-rest-framework#4179) - required for newer versions of django-rest-swagger - A [change](encode/django-rest-framework#4201) that prevents paginated views from re-running queries when count queries return 0 - this explains the expected query count changes made in tests LEARNER-1590
DRF 3.4.7 is the same version run by edx/credentials. Release notes are at http://www.django-rest-framework.org/topics/release-notes/#34x-series. Highlights include: 1. [Support for Django 1.10](encode/django-rest-framework#4158) - sigh 2. [Support for schema generation](encode/django-rest-framework#4179) - required for newer versions of django-rest-swagger 3. A change that [prevents paginated views from re-running queries](encode/django-rest-framework#4201) when count queries return 0 - this explains the expected query count changes made in tests LEARNER-1590
DRF 3.4.7 is the same version run by edx/credentials. Release notes are at http://www.django-rest-framework.org/topics/release-notes/#34x-series. Highlights include: 1. [Support for Django 1.10](encode/django-rest-framework#4158) - sigh 2. [Support for schema generation](encode/django-rest-framework#4179) - required for newer versions of django-rest-swagger 3. A change that [prevents paginated views from re-running queries](encode/django-rest-framework#4201) when count queries return 0 - this explains the expected query count changes made in tests LEARNER-1590
Working towards Django 1.10 support.