On Mar 8, 4:24 pm, Naveen Reddy <naveenredd...@gmail.com> wrote: > def user_page(request, username): > try: > user = User.objects.get(username=username) > except: > raise Http404('Requested user not found.') > bookmarks = user.bookmark_set.all() > template = get_template('user_page.html') > variables = Context({ > 'username': username, > 'bookmarks': bookmarks > })
No, everything from bookmarks onwards must be at the same level as 'try' and 'except'. Honestly, you need to read a Python tutorial. Indentation is significant in Python, and you won't get very far without understanding that. -- DR. -- 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.