示例#1
0
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))
示例#2
0
文件: views.py 项目: cvicentiu/wouso
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))
示例#3
0
文件: views.py 项目: TomyRO/wouso
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),
    )