Fixes in scripts for fedora
This commit is contained in:
parent
d54f94379b
commit
4914a1f0e7
8 changed files with 77 additions and 17 deletions
23
app.py
23
app.py
|
|
@ -0,0 +1,23 @@
|
|||
from modules.pastafari2 import pastafari_app
|
||||
from modules.pastafari2.models.pastafari2 import ServerDbTask
|
||||
from paramecio2.libraries.db.webmodel import WebModel
|
||||
try:
|
||||
import ujson as json
|
||||
except:
|
||||
import json
|
||||
|
||||
server=ServerDbTask()
|
||||
|
||||
@pastafari_app.route('/test')
|
||||
def test():
|
||||
|
||||
conn=WebModel.connection()
|
||||
|
||||
cursor=conn.query('select * from serverdbtask')
|
||||
|
||||
arr_row=[]
|
||||
|
||||
for row in cursor:
|
||||
arr_row.append(row)
|
||||
|
||||
return json.dumps(arr_row)
|
||||
Loading…
Add table
Add a link
Reference in a new issue