Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed code examples in which render() calls were missing `request` pa…

…rameter.
  • Loading branch information...
commit 5362134090adce86c755a6ab48831ba834b70704 1 parent f9a46d7
Vinod Kurup authored January 10, 2013 ramiro committed January 11, 2013

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  docs/topics/http/file-uploads.txt
4  docs/topics/http/file-uploads.txt
@@ -201,7 +201,7 @@ corresponding :class:`~django.db.models.FileField` when calling
201 201
                 return HttpResponseRedirect('/success/url/')
202 202
         else:
203 203
             form = ModelFormWithFileField()
204  
-        return render('upload.html', {'form': form})
  204
+        return render(request, 'upload.html', {'form': form})
205 205
 
206 206
 If you are constructing an object manually, you can simply assign the file
207 207
 object from :attr:`request.FILES <django.http.HttpRequest.FILES>` to the file
@@ -221,7 +221,7 @@ field in the model::
221 221
                 return HttpResponseRedirect('/success/url/')
222 222
         else:
223 223
             form = UploadFileForm()
224  
-        return render('upload.html', {'form': form})
  224
+        return render(request, 'upload.html', {'form': form})
225 225
 
226 226
 
227 227
 ``UploadedFile`` objects

0 notes on commit 5362134

Please sign in to comment.
Something went wrong with that request. Please try again.