Skip to content

Commit d5f7311

Browse files
Update app.py
1 parent 75ae05b commit d5f7311

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

app.py

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,7 @@
11
from datetime import datetime
2-
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
2+
from flask import Flask
33
app = Flask(__name__)
44

5-
6-
@app.route('/')
7-
def index():
8-
print('Request for index page received')
9-
return render_template('index.html')
10-
11-
@app.route('/favicon.ico')
12-
def favicon():
13-
return send_from_directory(os.path.join(app.root_path, 'static'),
14-
'favicon.ico', mimetype='image/vnd.microsoft.icon')
15-
16-
@app.route('/hello', methods=['POST'])
17-
def "Chodya tu Kon"():
18-
name = request.form.get('name')
19-
20-
if name:
21-
print('Request for hello page received with name=%s' % name)
22-
return render_template('hello.html', name = name)
23-
else:
24-
print('Request for hello page received with no name or blank name -- redirecting')
25-
return redirect(url_for('index'))
26-
27-
28-
if __name__ == '__main__':
29-
app.run()
30-
5+
@app.route("/")
6+
def hello():
7+
return "Aav, Chodya"

0 commit comments

Comments
 (0)