#跨域
This commit is contained in:
parent
2893c1de4a
commit
a61b5e43f8
|
@ -49,15 +49,16 @@ def alarm(request):
|
|||
cursor1.execute("select * from alarms where name = '%s' order by created_at desc " % (n))
|
||||
row1 = cursor1.fetchall()
|
||||
alarms = []
|
||||
alarms.append(n)
|
||||
for r1 in row1:
|
||||
print(r1)
|
||||
o = dict()
|
||||
o['id'] = r1[0]
|
||||
o['name'] = r1[1]
|
||||
o['type'] = r1[2]
|
||||
o['status'] = r1[5]
|
||||
o['duration'] = r1[6]
|
||||
o['created_at'] = r1[7]
|
||||
|
||||
alarms.append(o)
|
||||
print("===================================================================")
|
||||
res.append(alarms)
|
||||
|
|
Loading…
Reference in New Issue