On Fri, 2009-04-10 at 04:41 -0700, John Baker wrote: > I have a form that validates the size of a file and it works in one > page but not another. This is very strange. The only difference > between the two templates is that the working one has only a single > form (below) and the non-working one has 3 forms (including the form > below). For some reason, in a non-working situation the value of f is > None.
When you say the template has 3 forms, do you mean three separate HTML forms, or three form objects passed to the template that are combined into a single HTML form? The usual reason files aren't uploaded is because you forget to specify the enctype attribute as a multipart/form-data encoding. See http://docs.djangoproject.com/en/dev/ref/forms/api/#binding-uploaded-files-to-a-form . Did you perhaps forget to do that in the template that isn't working? This would be easy to do if you were using the form.is_multipart() test on another form object and combining it with your file upload form in the same HTML "form" element. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---