You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi all - I am quite new to python and Django but I'm starting to learn
my way around. I am writing a form for uploading files but the form
always seems to fail the form.is_valid() test. if I print the form
errors using:
errors = form.errors
print errors
I get this string:
<ul class="errorlist"><li>file<ul class="errorlist"><li>This field is
required.</li></ul></li></ul>
I can read the file name and file contents from the request.FILES
object and the data is there but is_valid() seems to always return
False. I guess there must be a default clean() method on uploaded
files that always returns false unless I override it? I think I can
write my own validator method and put it in clean_<fieldname>() in the
form subclass but I would like to find out why the error is happening
before I do that.
BTW, I can upload the same file through the admin interface and I do
not get the error.
TIA
mike.thon
unread,
Oct 19, 2009, 11:30:52 AM10/19/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message