Beispiel #1
0
def root_index():
    username = webtools.get_username_cookie()
    if username == None:
        redirect('/login')
    userinfo = get_user_info(username)
    if userinfo == None:
        redirect('/login')

    boy = userinfo['boy']
    girl = userinfo['girl']
    diarys = get_diarys_list(userinfo['diaryId'])
    return dict(boy=boy,girl=girl,diarys=diarys)
Beispiel #2
0
def diary_list():
    #DiaryService().dump_users()
    username = get_username_cookie()
    if username == None:
        redirect('/login')
    userinfo = get_user_info(username)
    if userinfo == None:
        redirect('/login')

    boy = userinfo['boy']
    girl = userinfo['girl']
    diarys = get_diary_list(userinfo['diaryId'])
    return dict(boy=boy,girl=girl,diarys=diarys)