mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.5.x] Fixed code examples in which render() calls were missing request parameter.
				
					
				
			5362134090 from master.This commit is contained in:
		
				
					committed by
					
						 Ramiro Morales
						Ramiro Morales
					
				
			
			
				
	
			
			
			
						parent
						
							64f1a175bd
						
					
				
				
					commit
					863e0ab57d
				
			| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user