negative indexing not supported on querysets? wtf.

This commit is contained in:
sanj 2010-09-01 13:56:30 +05:30
parent 27211fd65c
commit 27707e9841

View File

@ -11,7 +11,8 @@ def home(request):
if request.GET.has_key('issue_id'):
issue_id = request.GET.get('issue_id')
else:
issue_id = all_issues[-1].id
l = all_issues.count() - 1
issue_id = all_issues[l].id
current_issue = Issue.objects.get(pk=issue_id)
other_issues = all_issues.exclude(pk=issue_id)
return render_to_response("erang/home.html", {