summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorVinod Kurup <vinod@kurup.com>2013-01-10 16:17:52 -0500
committerRamiro Morales <cramm0@gmail.com>2013-01-11 15:52:47 -0300
commit5362134090adce86c755a6ab48831ba834b70704 (patch)
tree70309838ef701045ae5ede42cb45a28a9c14c900 /docs
parentf9a46d7bc9b321214f75c2e5fa8f416405a59ed9 (diff)
Fixed code examples in which render() calls were missing `request` parameter.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/http/file-uploads.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/http/file-uploads.txt b/docs/topics/http/file-uploads.txt
index 53499359e3..80bd5f3c44 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 <django.http.HttpRequest.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