-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
35 lines (20 loc) · 790 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
35
from flask import Flask, render_template, request
from GeneratorBrain import HeroNameGenerator
generation = HeroNameGenerator() #export the modul from generator brain
Website = Flask(__name__)
@Website.route("/")
def home_page():
generator = HeroNameGenerator()
if request.method == "POST":
user_name_number = int(request.form.get("user_name_number"))
number_of_names = generator.input_user()
return render_template("index.html", number_of_names=user_name_number)
return render_template("home.html")
@Website.route("/about")
def about_page():
return render_template('about.html')
@Website.route("/github")
def github_page():
return render_template('github.html')
if __name__ == "__main__":
Website.run(debug=True)