コード例 #1
0
ファイル: views.py プロジェクト: pwilkins/nbproject
def on_register_session(sender, **payload): 
    req = payload["req"]
    #print req.META
    uid =  UR.getUserInfo(req, True).id
    p={}
    p["ctime"] = payload["cid"]
    p["ip"]     = req.META["REMOTE_ADDR"] if "REMOTE_ADDR" in req.META else None
    annotations.register_session(uid, p)
コード例 #2
0
def on_register_session(sender, **payload): 
    req = payload["req"]
    #print req.META
    uid =  UR.getUserInfo(req, True).id
    p={}
    p["ctime"] = payload["cid"]
    p["ip"]     = req.META["REMOTE_ADDR"] if "REMOTE_ADDR" in req.META else None
    annotations.register_session(uid, p)