Hello guys!
First of all I don't know if I'm asking the right question, but i'll
try to explain myself the best I can:
I would like to know if in a view there is a way that after a "try:"
and evaluate the expression as false, it justs ignores that query and
display a message error, but keep loading everything else.
For example:
try:
posts = Post.objects.get(Author=user)
except Record.DoesNotExist:
//Missing code Here//
What I would like to do is: check if user has posted something, if he
hasn't just displays a "you haven't posted anything yet" where the
Post should be and it keeps loading everything else normally.
Thanks in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---