Skip to content

Commit

Permalink
[1.5.x] Fixed code examples in which render() calls were missing `req…
Browse files Browse the repository at this point in the history
…uest` parameter.

5362134 from master.
  • Loading branch information
vkurup authored and ramiro committed Jan 14, 2013
1 parent 64f1a17 commit 863e0ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/topics/http/file-uploads.txt
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 863e0ab

Please sign in to comment.