예제 #1
0
def format_nested_object(string, env, inner_map):
    name = string.strip()
    if name in inner_map:
        return ' <a href="/id/%s">%s</a>' % (get_id(inner_map[name]), name)
    return string
예제 #2
0
def format_variable(string, env, inner_map):
    value = env.get(string)
    if value is not None:
        return '<a href="/id/%s">%s</a>' % (get_id(get_editor(value)), string)
    return string
예제 #3
0
파일: rest.py 프로젝트: void4/hmph
 def post_makeaccount(self, http):
     import builtin
     account = builtin.make_account()
     add_account(get_id(account))
     http.redirect('%s' % get_uri(account))
예제 #4
0
파일: rest.py 프로젝트: darius/hmph
 def post_makeaccount(self, http):
     import builtin
     account = builtin.make_account()
     add_account(get_id(account))
     http.redirect('%s' % get_uri(account))
예제 #5
0
파일: parser.py 프로젝트: darius/hmph
def format_nested_object(string, env, inner_map):
    name = string.strip()
    if name in inner_map:
        return ' <a href="/id/%s">%s</a>' % (get_id(inner_map[name]), name)
    return string
예제 #6
0
파일: parser.py 프로젝트: darius/hmph
def format_variable(string, env, inner_map):
    value = env.get(string)
    if value is not None:
        return '<a href="/id/%s">%s</a>' % (get_id(get_editor(value)), string)
    return string