-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from gavinmorrisseau/Flask
Add Flask
- Loading branch information
Showing
148 changed files
with
31,949 additions
and
75 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
.cache | ||
playground.py | ||
.gitignore | ||
.DS_Store |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from flask import Flask, render_template, request | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route("/") | ||
def index(): | ||
return render_template("index.html") | ||
@app.route("/result", methods=["POST", "GET"]) | ||
def result(): | ||
output = request.form.to_dict() | ||
question = output["question"] | ||
return render_template("index.html", question=question) | ||
|
||
if __name__ == "__main__": | ||
app.run(debug=True, port=5001) |
File renamed without changes.
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
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Empty file.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<!-- Favicon --> | ||
<link rel="icon" type="image/svg+xml" href="../static/assets/images/favicon.svg"> | ||
<link rel="icon" type="image/png" href="../static/assets/images/favicon.png"> | ||
<!-- Theming --> | ||
<meta name="theme-color" content="#FAF9F6"> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<!-- Title and Stylesheet --> | ||
<title>aijukebox.net</title> | ||
<link rel="stylesheet" href="/static/styles/index.css" /> | ||
</head> | ||
<body> | ||
<div class="noselect" id="header"> | ||
<h1 id="headertext">hey, boss<img id="headerlogo" src="../static/assets/images/OriginalLogoTransparent.png" alt="logo"></h1> | ||
<p id="subtext">what's the mood today?</p> | ||
</div> | ||
<div class="chatbox"> | ||
<div class="chatbox__input"> | ||
<form action="/result" method="POST"> | ||
<input type="text" name="question" id="question" placeholder="type a message ..."> | ||
<button class="button">send</button> | ||
</form> | ||
{% if question%} | ||
<p>{{question}}</p> | ||
{% endif %} | ||
</div> | ||
</div> | ||
<script src="static/js/index.js"></script> | ||
</body> | ||
</html> |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.