OK I'll start checking stuff then. Even when you have errors on a screen all of the data previously entered should still be returned back to the screen with the errors right?
On Mar 18, 2:47 pm, Shawn Milochik <sh...@milochik.com> wrote: > Do you know for certain that you're getting past this line? > > if request.method == "POST" and referer.endswith('upload/'): > > Also, you might want to add some logging to your app (or use pdb) to > get information about what's going on at runtime. > > Some things I would check: > > You have a LOT of fields in this template. Are you sure you're > putting them all (especially all the required ones) in your template? > > Do a log.debug of form.errors after the failed is_valid() check to > see all the errors. I know you're printing the errors of the > individual fields in the template, but you may have missed one, and > there are also non-field errors to look for. > > In addition, for a form this complex, it would be a great idea to > write a unit test for it. Not just to get it working, but so you can > be relatively confident that future changes to the application don't > break it. > > Things to test (at a minimum): > > If you create a form and pass it all required fields, is_valid() > returns True. > > If you create a form and pass it all required fields except one, > is_valid() returns False. > Make sure you iterate through all required fields and leave > each one out individually to check this. > > Shawn -- 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.