Remove useless mysql function

This commit is contained in:
James Wang 2015-12-23 09:34:20 -05:00
parent 489c5e596b
commit ab2b52adff

View file

@ -1,21 +1,9 @@
import datetime
import MySQLdb
import random
import string
from werkzeug.security import generate_password_hash, check_password_hash
host = "localhost"
user = "root"
conn = MySQLdb.connect()
def get_connection():
global conn
if not conn:
conn = MySQLdb.connect(host=host, user=user)
return conn
def hash_password(s):
return generate_password_hash(s)