views:

148

answers:

1

This is a python application that's supposed to get all the followers from one table and get their latest updates from another table. - All happening in the dashboard.

dashboard.html: http://bizteen.pastebin.com/m65c4ae2d

the dashboard function in views.py: http://bizteen.pastebin.com/m39798bd5

result: http://bizteen.pastebin.com/mc12d958

NOTE: When you run the the first div is ok cause thats the div from the latest user status so ignore the 1st div in the result..but as u can see all the rest is blank

so i basically get 0 errors..:S

CAN YOU PLEASEEEEE HELP me OUT here???? :D :D I'd reallllly appreciate it!!! :D Thanks!!!!

+1  A: 

There's far too much code there to try and work out what's going on, and your explanation is not particularly clear.

However, one obvious problem is that you've got a lot of blank except clauses, which is almost always a bad idea as it masks any problems that might be happening outside of what you already expected. Always, always use except with one or more actual exception classes - except Object.DoesNotExist for example.

Secondly, you need to try and debug this by working out what the values are at each point. The simplest way is to put print statements after every assignment. The values should show up in the console. This will help you track down exactly where your logic is going wrong.

Daniel Roseman
To clean up the excepts, look at this question I asked a bit ago, it should help you with your code style: http://stackoverflow.com/questions/1117460/cleaning-up-nested-try-excepts
Paul McMillan
Thanks, I didnt know about the print statement in python.
Emil Hajric
Wait... what? You didn't know about the `print` statement? What the hell happened to the "Hello world" example used in virtually any tutorial ever created?
wuub
like, for example: http://docs.python.org/tutorial/
Markus