Commit 1b6157cc authored by Neranga K.T.'s avatar Neranga K.T.

db connection changed

parent b86c4d1f
...@@ -60,13 +60,14 @@ def get_level(): ...@@ -60,13 +60,14 @@ def get_level():
results=[{"level":float(result)}] results=[{"level":float(result)}]
return (jsonify(results=results)) return (jsonify(results=results))
userpass = 'mysql://root:''@' # userpass = 'mysql://root:''@'
basedir = '127.0.0.1' # basedir = '127.0.0.1'
dbname = '/helply' # dbname = '/helply'
socket = '?unix_socket=/opt/lampp/var/mysql/mysql.sock' # socket = '?unix_socket=/opt/lampp/var/mysql/mysql.sock'
dbname = dbname + socket # dbname = dbname + socket
app.config['SQLALCHEMY_DATABASE_URI'] = userpass + basedir + dbname # app.config['SQLALCHEMY_DATABASE_URI'] = userpass + basedir + dbname
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://sql5488870:UylH12yrME@sql5.freesqldatabase.com/sql5488870'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
#DB Connection #DB Connection
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment