Update session
This commit is contained in:
parent
6105b5c663
commit
04e51e457c
@ -24,11 +24,11 @@ class idManager():
|
|||||||
self.gid = 0
|
self.gid = 0
|
||||||
|
|
||||||
def iniId(self, ip):
|
def iniId(self, ip):
|
||||||
self.ip_id[ip] = ip
|
self.ip_id[str(ip)] = str(ip)
|
||||||
# self.gid += 1
|
# self.gid += 1
|
||||||
# self.ip_dic[ip] = str(self.gid)
|
# self.ip_dic[ip] = str(self.gid)
|
||||||
# return str(self.gid)
|
# return str(self.gid)
|
||||||
return ip
|
return str(ip)
|
||||||
|
|
||||||
def getId(self, ip):
|
def getId(self, ip):
|
||||||
return self.ip_dic[ip]
|
return self.ip_dic[ip]
|
||||||
@ -91,10 +91,8 @@ class idManager():
|
|||||||
|
|
||||||
def setControl(self, ip, content):
|
def setControl(self, ip, content):
|
||||||
if content == "A":
|
if content == "A":
|
||||||
print("A" + ip)
|
|
||||||
self.ip_control[ip] = 0
|
self.ip_control[ip] = 0
|
||||||
else:
|
else:
|
||||||
print("B" + ip)
|
|
||||||
self.ip_control[ip] = 1
|
self.ip_control[ip] = 1
|
||||||
|
|
||||||
def setTimes(self, ip):
|
def setTimes(self, ip):
|
||||||
|
8
main.py
8
main.py
@ -66,7 +66,7 @@ def gametutorial(id):
|
|||||||
|
|
||||||
@app.route('/again')
|
@app.route('/again')
|
||||||
def gamepreplayAgain():
|
def gamepreplayAgain():
|
||||||
return redirect(url_for('gameplay', getId()))
|
return redirect(url_for('gameplay', id=getId()))
|
||||||
|
|
||||||
|
|
||||||
@app.route('/gametutorial/<id>/data')
|
@app.route('/gametutorial/<id>/data')
|
||||||
@ -92,7 +92,7 @@ def getJSONData(id):
|
|||||||
|
|
||||||
@app.route('/annotation')
|
@app.route('/annotation')
|
||||||
def gamepreanno():
|
def gamepreanno():
|
||||||
return redirect(url_for('gameanno', getId()))
|
return redirect(url_for('gameanno', id=getId()))
|
||||||
|
|
||||||
|
|
||||||
@app.route('/annotation/<id>')
|
@app.route('/annotation/<id>')
|
||||||
@ -125,7 +125,7 @@ def getRadioData():
|
|||||||
|
|
||||||
@app.route('/gameplay2')
|
@app.route('/gameplay2')
|
||||||
def gamepreplay2():
|
def gamepreplay2():
|
||||||
return redirect(url_for('gameplay2', getId()))
|
return redirect(url_for('gameplay2', id=getId()))
|
||||||
|
|
||||||
|
|
||||||
@app.route('/gameplay2/<id>')
|
@app.route('/gameplay2/<id>')
|
||||||
@ -146,7 +146,7 @@ def getJSONData2(id):
|
|||||||
|
|
||||||
@app.route('/annotation2')
|
@app.route('/annotation2')
|
||||||
def gamepreanno2():
|
def gamepreanno2():
|
||||||
return redirect(url_for('gameanno2', getId()))
|
return redirect(url_for('gameanno2', id=getId()))
|
||||||
|
|
||||||
|
|
||||||
@app.route('/annotation2/<id>')
|
@app.route('/annotation2/<id>')
|
||||||
|
Loading…
Reference in New Issue
Block a user