From ae34dbc0defcb7c1590c6695bc686933cfd892bb Mon Sep 17 00:00:00 2001 From: BorisKolganov Date: Wed, 1 Jul 2015 12:15:01 +0300 Subject: [PATCH] done --- db_api_3.py | 9 +++++---- db_api_3.pyc | Bin 33035 -> 33038 bytes helper2_0.py | 2 +- helper2_0.pyc | Bin 4924 -> 4926 bytes 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/db_api_3.py b/db_api_3.py index bd04f74..86d8955 100644 --- a/db_api_3.py +++ b/db_api_3.py @@ -3,12 +3,13 @@ from helper2_0 import get_forum_info, get_user_info, get_thread_info, get_post_info, DB, right_index, DoesNotExist import MySQLdb from datetime import datetime -from flask.ext.runner import Runner + app = Flask(__name__) -app.debug = True -runner = Runner(app) +app.debug = False +app.config['JSON_SORT_KEYS'] = False +app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False db = DB() @@ -1014,4 +1015,4 @@ def index(): return "lol" if __name__ == '__main__': - runner.run() \ No newline at end of file + app.run() \ No newline at end of file diff --git a/db_api_3.pyc b/db_api_3.pyc index af45598c902c763490abe509b556cdda1b5fd6b4..966e9311d78a47251bd0ac3ea54fae3443969965 100644 GIT binary patch delta 6953 zcmds5Yit}>6`s4XH;LDe^<({hKjKYdJ8L`fD|XgS;v~+)cE)y6J9U?hckFDl-gP|V zJZUybs}d<{NOJ(uqR;|DNR^sU1_=q&O3*(DgjArVLWQd02T&vwsun4LlyJ|vzB@av z^Pk5=v7-E+v$%%rLH*g)#`iO%zE$CIPaPnYci>C8Ag&vL!+QawMQc0&?wuJP9b3 z0PZ7qg4+-p@+F{50tz@Fp5$hsM3hTJ5vfS5qgVneB%s6&D3yRp2`IBWQ7!>hi-35j z!j7nvh-#^#$_}WOfEo#?u{%*K0kslPXV{irC7{&~*eC%F60pe*Xj9^tyF4=+ zC8FJq=#VO!B%sp{=#qd960n&7iM;EU0G|Z(Bmv^QJhn(gvqbpqHhLwXMFRSgRB#Pj zC7@LTw%Ijomw=5D&@TXSSsptiVv|Jdw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+++ b/helper2_0.py @@ -5,7 +5,7 @@ class DoesNotExist(Exception): class DB(): def __init__(self): - self.connection = MySQLdb.connect(host="localhost", user="root", db="db_api") + self.connection = MySQLdb.connect(host="localhost", user="root", db="db_api_2") #self.get_cursor().execute("SET FOREIGN_KEY_CHECKS = 0;"); def get_cursor(self, modif=None): self.connection.ping(True) diff --git a/helper2_0.pyc b/helper2_0.pyc index e000f0e83b29fd249b9c60099023e0ed48b3808a..2fb918209247224c6b2be199427c4ffc901718ba 100644 GIT binary patch delta 34 qcmdm^woi?n`7