Closed
Description
Hello, good evening. I found a problem in the rest_framework/views.py
file. See the source code snippet below:
def raise_uncaught_exception(self, exc):
if settings.DEBUG:
request = self.request
renderer_format = getattr(request.accepted_renderer, 'format')
use_plaintext_traceback = renderer_format not in ('html', 'api', 'admin')
request.force_plaintext_errors(use_plaintext_traceback)
raise
What program exception do you want to throw? I guess uncaught exception.
I uninstall it and reinstall it like this. My installation process is as follows:
(venv) D:\workspace\pycharm\Mx_Shopping>pip install djangorestframework
Looking in indexes: http://mirrors.aliyun.com/pypi/simple
Collecting djangorestframework
Downloading http://mirrors.aliyun.com/pypi/packages/99/0b/d37a5a96c5d301e23adcabcc2f3fa659fb34e6308590f95ebb50cdbe98a1/djangorestframework-3.9.0-py2.py3-none-any
.whl (924kB)
100% |████████████████████████████████| 931kB 6.6MB/s
Installing collected packages: djangorestframework
Successfully installed djangorestframework-3.9.0
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Metadata
Metadata
Assignees
Labels
No labels