From 0e8710d5900a75b9a4a1caebb82c939896e99cff Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Tue, 1 Jul 2008 15:49:08 +0000 Subject: newforms-admin: Merged from trunk up to [7814]. git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7815 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/newforms.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/newforms.txt') diff --git a/docs/newforms.txt b/docs/newforms.txt index 8386c0507c..be3a0b6a2a 100644 --- a/docs/newforms.txt +++ b/docs/newforms.txt @@ -808,12 +808,12 @@ ContactForm to include an ``ImageField`` called ``mugshot``, we need to bind the file data containing the mugshot image:: # Bound form with an image field + >>> from django.core.files.uploadedfile import SimpleUploadedFile >>> data = {'subject': 'hello', ... 'message': 'Hi there', ... 'sender': 'foo@example.com', ... 'cc_myself': True} - >>> file_data = {'mugshot': {'filename':'face.jpg' - ... 'content': }} + >>> file_data = {'mugshot': SimpleUploadedFile('face.jpg', )} >>> f = ContactFormWithMugshot(data, file_data) In practice, you will usually specify ``request.FILES`` as the source -- cgit v1.3