Created
August 18, 2015 23:16
-
-
Save sujayy1983/836b10ce43e9e4ee7188 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.route("/tableCreate") | |
def create_table(): | |
return """ | |
<html> | |
<head> | |
<link rel= "stylesheet" type= "text/css" href= "/static/style.css"> | |
</head> | |
<body> | |
<form action="http://192.168.0.2:5000/form" method="post"> | |
Table name: <input type="text" name="tableName"><br><br> | |
Table schema: <input type="text" name="schema"><br><br> | |
<input type="submit" value="Submit"> | |
</form> | |
</body> | |
</html> | |
""" | |
@app.route("/form", methods=['POST']) | |
def create_form(): | |
print(request.form['tableName']) | |
print(request.form['schema']) | |
return "<h4> Success creating table!! Table name: [%s] <h4> " %(request.form['tableName']) | |
""" | |
Style.css | |
form | |
{ | |
width: 400px; | |
color: #3E4A98; | |
background-color: #38F4D6; | |
padding: 50px; | |
border: 4px solid #4899BE; | |
font-family: "Trebuchet MS", Arial, Helvetica, Sans-serif; | |
font-size: 0.9em; | |
} | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment