On Wed, Jan 27, 2010 at 2:54 PM, Karen Tracey <kmtra...@gmail.com> wrote:
> On Wed, Jan 27, 2010 at 9:45 AM, Malcolm Box <malcolm....@gmail.com>wrote: > >> That code looks fine to me. I'd suggest sticking an "import >> pdb;pdb.set_trace()" as the first line of the view, then stepping through >> the code (run the server with manage.py runserver). That should quickly >> highlight any areas where the code flow isn't as you expect. >> >> > Single stepping through in the debugger is a good suggestion. However, the > code as posted is not fine, since the blocks under try and except are not > indented any further than the try/except statements, and they need to be. > What was posted can't possibly be what is actually running since the posted > code will generate an IndentationError on an attempt to import it. > > It was indented if you looked in the original message text - I suspect your (and my) default email program is stripping leading spaces. 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-us...@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.