示例#1
0
文件: app.py 项目: sambapython/Flask
def create(table_name):
	conn=db_connect() # to get the connection object
	cur=conn.cursor() # creting cursor object
	if request.method=="POST":
		flag=set_data(table_name,request.form)
	else:
		cur.execute("select column_name, data_type, character_maximum_length from INFORMATION_SCHEMA.COLUMNS where table_name = "+table_name+";")
		print cur.fetchall(),"$$$$$$$$$$$$$$$$"
		return render_template('common_form.html',column)
示例#2
0
文件: app.py 项目: sambapython/Flask
def client_reg():
	if request.method=="POST":
		flag=set_data('client',request.form)
	return render_template('client_reg.html')