-
Notifications
You must be signed in to change notification settings - Fork 1
/
routes.py
50 lines (37 loc) · 1.15 KB
/
routes.py
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
# routes.py
# last edited: 04/21/2021
import os
from flask import Flask, render_template, request, redirect, url_for, jsonify, send_from_directory
#from create_db import app, db, create_tables, stocks, sectors, indices, industries # database
import random
import requests
import json
app = Flask(__name__, static_folder="./assets", template_folder="./src/pages")
###########################################
# pages
###########################################
# home page
@app.route('/')
@app.route('/home/')
def homePage():
return render_template("Home.js")
###########################################
# about page
@app.route('/about/')
def aboutPage():
return render_template("About.js")
###########################################
# contact page
@app.route('/contact/')
def contactPage():
return render_template("Contact.js")
###########################################
# form page
@app.route('/form/')
def formPage():
return render_template("Form.js")
###########################################
if __name__ == '__main__':
#app.debug = True
#app.run(host = '0.0.0.0', port = 5000)
app.run(host = 'localhost', port = 5000,debug=True)