diff --git a/docs/topics/http/file-uploads.txt b/docs/topics/http/file-uploads.txt index 53499359e3200..80bd5f3c4499f 100644 --- a/docs/topics/http/file-uploads.txt +++ b/docs/topics/http/file-uploads.txt @@ -201,7 +201,7 @@ corresponding :class:`~django.db.models.FileField` when calling return HttpResponseRedirect('/success/url/') else: form = ModelFormWithFileField() - return render('upload.html', {'form': form}) + return render(request, 'upload.html', {'form': form}) If you are constructing an object manually, you can simply assign the file object from :attr:`request.FILES ` to the file @@ -221,7 +221,7 @@ field in the model:: return HttpResponseRedirect('/success/url/') else: form = UploadFileForm() - return render('upload.html', {'form': form}) + return render(request, 'upload.html', {'form': form}) ``UploadedFile`` objects