Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Errors with Django 1.10 #452

Closed
tarkatronic opened this issue Jun 9, 2016 · 3 comments
Closed

Errors with Django 1.10 #452

tarkatronic opened this issue Jun 9, 2016 · 3 comments

Comments

@tarkatronic
Copy link
Contributor

I get the following when I added Django 1.10a1 to my tox environment:

.tox/py27-django110/lib/python2.7/site-packages/rest_framework_swagger/urls.py:2: in <module>
    from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView
.tox/py27-django110/lib/python2.7/site-packages/rest_framework_swagger/views.py:8: in <module>
    from django.shortcuts import render_to_response, RequestContext
E   ImportError: cannot import name RequestContext

I believe this is because RequestContext is supposed to come from django.template, not django.shortcuts.

https://docs.djangoproject.com/en/1.9/ref/templates/api/#django.template.RequestContext

AFAIK, changing this should be fully backward compatible.

@sawaabasadeque
Copy link

Thanks, it works

@aj07mm
Copy link

aj07mm commented Nov 23, 2016

I'm getting this after the changes you mentioned:

from django_filters.rest_framework.filterset import FilterSet as DFFilterSet
ImportError: No module named rest_framework.filterset

django 1.10.3
djangorestframework==3.5.3
Python 2.7.10

@tarkatronic
Copy link
Contributor Author

@aj07mm I believe that is an unrelated issue: carltongibson/django-filter#567

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants