Example #1
0
def before_request():
    g.session = request.environ['xiaomen.session']
    g.current_user = get_current_user()
    #TODO remove
    if g.current_user:
        g.topic_notify = lambda: topic_notify(g.current_user.id)
Example #2
0
def unread(uid):
    has = topic_notify(int(uid))
    return has