示例#1
0
def date_with_offset(value, arg):
    # Usage of date format
    # "%d %B %Y" = 12 january 2007
    # %d %B %Y, %H:%M
    try:
        timeoffset = get_request().user.timeoffset
        if not timeoffset:
            timeoffset = 0
    except:
        timeoffset = 0

    if not value:
        return u''
    if arg is None:
        arg = settings.DATE_FORMAT
    return pytils.dt.ru_strftime(arg, inflected=True, date=value+datetime.timedelta(seconds=timeoffset))
示例#2
0
def solutions():
    session = get_request().session
    if not 'captcha_solutions' in session:
        session['captcha_solutions'] = {}
    return session['captcha_solutions']
示例#3
0
文件: __init__.py 项目: ixth/blombum
def solutions():
    session = get_request().session
    if not 'captcha_solutions' in session:
        session['captcha_solutions'] = {}
    return session['captcha_solutions']