-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Description
The documentation for FileUploadView at https://github.com/tomchristie/django-rest-framework/blob/master/docs/api-guide/parsers.md#basic-usage-example
contains a mistake (perhaps old version).
it has:
def put(self, request, filename, format=None):
what works in 3.3.3
def put(self, request, format=None):
If the filename
is present, the following exception happen.
Internal Server Error: /uploadapp/uploadfile
Traceback (most recent call last):
File "/opt/venv/p3-django/lib/python3.4/site-packages/django/core/handlers/base.py", line 149, in get_response
response = self.process_exception_by_middleware(e, request)
File "/opt/venv/p3-django/lib/python3.4/site-packages/django/core/handlers/base.py", line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/venv/p3-django/lib/python3.4/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/opt/venv/p3-django/lib/python3.4/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, *args, **kwargs)
File "/opt/venv/p3-django/lib/python3.4/site-packages/rest_framework/views.py", line 468, in dispatch
response = self.handle_exception(exc)
File "/opt/venv/p3-django/lib/python3.4/site-packages/rest_framework/views.py", line 465, in dispatch
response = handler(request, *args, **kwargs)
TypeError: put() missing 1 required positional argument: 'filename'
[01/Jun/2016 02:57:58] "PUT /uploadapp/uploadfile HTTP/1.1" 500 74097
muhalitas and davincif
Metadata
Metadata
Assignees
Labels
No labels