Kaydet (Commit) 53621340 authored tarafından Vinod Kurup's avatar Vinod Kurup Kaydeden (comit) Ramiro Morales

Fixed code examples in which render() calls were missing `request` parameter.

üst f9a46d7b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment