-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.py
More file actions
76 lines (55 loc) · 1.81 KB
/
Copy pathapp.py
File metadata and controls
76 lines (55 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import os
from flask import (Flask, redirect, render_template, request,
send_from_directory, url_for)
app = Flask(__name__)
@app.route('/')
def index():
print('Request for index page received')
return render_template('home.html')
@app.route('/favicon.ico')
def favicon():
return send_from_directory(os.path.join(app.root_path, 'static'),
'favicon.ico', mimetype='image/vnd.microsoft.icon')
@app.route('/agent')
def agent():
return render_template('basic_agent.html')
@app.route('/basic')
def basic():
return render_template('basic2.html')
@app.route('/irs')
def irs():
return render_template('irs.html')
@app.route('/springfield')
def springfield():
return render_template('springfield_homepage.html')
@app.route('/account')
def account():
user = {
'name': 'Taylor Morgan',
'account_number': 'TELCO-2025001',
'email': 'taylor.morgan@mytelco.com',
'phone': '+1 (555) 246-8100',
'plan': 'Premium Unlimited',
'balance': '$15.75',
'status': 'Active',
'address': '789 Oak Avenue, Gotham, USA'
}
return render_template('account.html', user=user)
@app.route('/hello', methods=['POST'])
def hello():
name = request.form.get('name')
if name:
print('Request for hello page received with name=%s' % name)
return render_template('hello.html', name = name)
else:
print('Request for hello page received with no name or blank name -- redirecting')
return redirect(url_for('index'))
# Add this route for the botframework webchat
@app.route('/botframework')
def botframework():
return render_template('botframework/public/webchat.html')
@app.route('/contoso')
def contoso():
return render_template('contoso.html')
if __name__ == '__main__':
app.run()