Skip to content

Instantly share code, notes, and snippets.

@sujayy1983
Created August 18, 2015 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sujayy1983/836b10ce43e9e4ee7188 to your computer and use it in GitHub Desktop.
Save sujayy1983/836b10ce43e9e4ee7188 to your computer and use it in GitHub Desktop.
@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