Exemplo n.º 1
0
def posts(postid):
    import time
    postid = urllib.unquote(postid)
    post_info = api.get_post(postid)
    if post_info:
        post_info['url'] = urllib.quote(api.unicode_convert(post_info['url']))
        post_info['time'] = api.unicode_convert(time.strftime(api.unicode_convert(
            config.site_info['TIME_FORMAT']), time.localtime(float(post_info['time']))), False)
        return render_template('posts.html',
            site_config=config.site_info, header=api.get_header(), post=post_info)
    else:
        abort(404)
Exemplo n.º 2
0
def posts(postid):
    import time
    import urllib
    postid = urllib.unquote(postid).encode('utf-8')
    post_info = api.get_post(postid)
    if post_info:
        post_info['url'] = urllib.quote(post_info['url'])
        post_info['time'] = time.strftime(config.site_info['TIME_FORMAT'],
            time.localtime(float(post_info['time'])))
        return render_template('posts.html',
            site_config=config.site_info, header=api.get_header(), post=post_info)
    else:
        abort(404)