Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
BorisKolganov committed Jul 1, 2015
1 parent e387e4a commit ae34dbc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions db_api_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -1014,4 +1015,4 @@ def index():
return "lol"

if __name__ == '__main__':
runner.run()
app.run()
Binary file modified db_api_3.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion helper2_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Binary file modified helper2_0.pyc
Binary file not shown.

0 comments on commit ae34dbc

Please sign in to comment.