-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
34 lines (26 loc) · 778 Bytes
/
main.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
import os
from flask import Flask, render_template
from dotenv import load_dotenv
load_dotenv()
app = Flask(__name__)
from api.Continents import Continents
continents = Continents()
from api.Countries import Countries
countries = Countries()
@app.route("/")
def home():
return render_template('index.html')
@app.route("/continents/<name>")
def return_data_continent(name):
return continents.get_data(name)
@app.route("/countries/<name>")
def return_data_country(name):
return countries.get_data(name)
@app.route("/SafetyMeasures/")
def safety_measures():
return render_template('safetymeasures.html')
@app.route("/FAQs/")
def faq_covid19():
return render_template('faq.html')
if __name__ == "__main__":
app.run(port=os.getenv("PORT"), debug=True)