From 863e0ab57d44d6d0fb1d7dc887e16b2f2159931c Mon Sep 17 00:00:00 2001 From: Vinod Kurup Date: Thu, 10 Jan 2013 16:17:52 -0500 Subject: [PATCH] [1.5.x] Fixed code examples in which render() calls were missing `request` parameter. 5362134090adce86c755a6ab48831ba834b70704 from master. --- docs/topics/http/file-uploads.txt | 4 ++-- 1 file 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 ` 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