Skip to content
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

STATUS_CODE_TEXT was removed from django in trac ticket #24137 #2763

Closed
ovangle opened this issue Mar 25, 2015 · 1 comment
Closed

STATUS_CODE_TEXT was removed from django in trac ticket #24137 #2763

ovangle opened this issue Mar 25, 2015 · 1 comment

Comments

@ovangle
Copy link
Contributor

ovangle commented Mar 25, 2015

I'm getting an ImportError when using django 1.8 beta and rest framework 3.1.0

File "/<omitted>/rest_framework/response.py", line 8, in <module>
    from django.core.handlers.wsgi import STATUS_CODE_TEXT
ImportError: cannot import name 'STATUS_CODE_TEXT'
@jpadilla
Copy link
Member

Link to relevant ticket https://code.djangoproject.com/ticket/24137. In summary we should probably be able to do something like in response.py:

from django.utils.six.moves.http_client import responses
return responses.get(self.status_code, '')

carltongibson pushed a commit that referenced this issue Mar 25, 2015
Use default reason phrases from HTTP standard. Fixes #2763
maryokhin pushed a commit to maryokhin/django-rest-framework that referenced this issue Apr 2, 2015
bleib1dj pushed a commit to bleib1dj/django-rest-framework that referenced this issue Apr 5, 2015
dirigeant pushed a commit to dirigeant/django-rest-framework that referenced this issue Nov 7, 2017
Closes encode#2763
Conflicts:
	rest_framework/response.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants