def index(request, error=''): user = request.user.get_profile().get_extension(SpecialQuestUser) tasks_done, tasks_not_done = SpecialQuestGame.tasks_for_user(user) today = date.today() tasks_not_done = [(t, (t.end_date - today).days + 1) for t in tasks_not_done] return render_to_response('specialquest/index.html', {'tasks_done': tasks_done, 'tasks_not_done': tasks_not_done, 'squser': user, 'error': error}, context_instance=RequestContext(request))
def index(request, error=""): user = request.user.get_profile().get_extension(SpecialQuestUser) tasks_done, tasks_not_done = SpecialQuestGame.tasks_for_user(user) today = date.today() tasks_not_done = [(t, (t.end_date - today).days + 1) for t in tasks_not_done] return render_to_response( "specialquest/index.html", {"tasks_done": tasks_done, "tasks_not_done": tasks_not_done, "squser": user, "error": error}, context_instance=RequestContext(request), )