On Wed, Apr 29, 2009 at 4:18 PM, Jari Pennanen <jari.penna...@gmail.com>wrote:
> > Remember to check also: form.non_field_errors > > On Apr 29, 11:59 pm, Ayaz Ahmed Khan <a...@ayaz.pk> wrote: > > On 28-Apr-09, at 8:35 PM, Margie wrote: > > > > > I often put a break point using pdb > > > > > import pdb > > > pdb.set_trace() > > > > > This causes the server (assuming you are using the django > > > development server) to drop to the pdb prompt when it hits the > > > set_trace(). > > > > > Then I just print the form and look at the output. > > > > Oh, that's lovely, indeed. The thought of using the debugger never > > crossed my mind. The OP may or may not have had a slightly different > > requirement than mine, but for me the task of debugging a problem when > > writing unit tests and subsequently the views being tested, may become > > daunting. I could always drop to an interactive shell, instantiate > > objects and inspect their contents and stuff, but the alternative to > > use pdb the way you have suggested is much, much better and more > > convenient. > > > > -- > > Ayaz Ahmed Khan > > > > You might have mail. > > > form.non_field_errors are in form.errors with the "__all__" key. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---