-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathapp.py
More file actions
33 lines (24 loc) · 773 Bytes
/
app.py
File metadata and controls
33 lines (24 loc) · 773 Bytes
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
from flask import render_template
from populate import populate
from standings_scapper import standings_scapper
import config
SCRAPPING_URL = "https://www.cricketworldcup.com/standings/"
app = config.app
with app.app_context():
populate(config)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/standings')
def standings():
standings = standings_scapper(SCRAPPING_URL)
return render_template('standings.html', standings=standings)
@app.route('/fixtures')
def fixtures():
fixtures = config.Fixtures.query.all()
return render_template('fixtures.html', fixtures=fixtures)
@app.route('/Fan_Poll')
def Fan_Poll():
return render_template('Fan_Poll.html')
if __name__ == "__main__":
app.run(debug=True)