Spaces:
Sleeping
Sleeping
portfolio base set
Browse files- app.py +11 -7
- npc_social_network/routes/npc_route.py +2 -2
- npc_social_network/templates/base.html +1 -1
- npc_social_network/templates/chat.html +1 -1
- templates/main.html +12 -0
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
# app.py
|
2 |
-
from flask import Flask
|
3 |
-
from npc_social_network.routes import npc_bp
|
4 |
|
5 |
def create_app():
|
6 |
app = Flask(__name__)
|
@@ -10,8 +10,12 @@ def create_app():
|
|
10 |
|
11 |
@app.route("/")
|
12 |
def index():
|
13 |
-
return "
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
# portfolio/app.py
|
2 |
+
from flask import Flask, render_template
|
3 |
+
from npc_social_network.routes.npc_route import npc_bp
|
4 |
|
5 |
def create_app():
|
6 |
app = Flask(__name__)
|
|
|
10 |
|
11 |
@app.route("/")
|
12 |
def index():
|
13 |
+
return render_template("main.html")
|
14 |
|
15 |
+
|
16 |
+
return app
|
17 |
+
|
18 |
+
app = create_app()
|
19 |
+
|
20 |
+
if __name__ == '__main__':
|
21 |
+
app.run(debug=True)
|
npc_social_network/routes/npc_route.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
# portfolio/npc_social_network/routes/npc_route.py
|
2 |
from flask import Blueprint, render_template
|
3 |
|
4 |
-
npc_bp = Blueprint("npc_social", __name__, url_prefix="/npc_social_network", template_folder="templates")
|
5 |
|
6 |
@npc_bp.route("/")
|
7 |
def index():
|
8 |
-
return render_template("
|
|
|
1 |
# portfolio/npc_social_network/routes/npc_route.py
|
2 |
from flask import Blueprint, render_template
|
3 |
|
4 |
+
npc_bp = Blueprint("npc_social", __name__, url_prefix="/npc_social_network", template_folder="../templates")
|
5 |
|
6 |
@npc_bp.route("/")
|
7 |
def index():
|
8 |
+
return render_template("chat.html")
|
npc_social_network/templates/base.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<!-- npc_social_network/templates/base.html -->
|
2 |
<!DOCTYPE html>
|
3 |
<html lang="en">
|
4 |
<head>
|
|
|
1 |
+
<!-- portfolio/npc_social_network/templates/base.html -->
|
2 |
<!DOCTYPE html>
|
3 |
<html lang="en">
|
4 |
<head>
|
npc_social_network/templates/chat.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<!-- npc_social_network/templates/chat.html-->
|
2 |
<!DOCTYPE html>
|
3 |
<html lang="en">
|
4 |
<head>
|
|
|
1 |
+
<!-- portfolio/npc_social_network/templates/chat.html -->
|
2 |
<!DOCTYPE html>
|
3 |
<html lang="en">
|
4 |
<head>
|
templates/main.html
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Portfolio Main</title>
|
7 |
+
</head>
|
8 |
+
<body>
|
9 |
+
<h1>Welcome to the Portfolio</h1>
|
10 |
+
<a href="/npc_social_network">Go to Project 1</a>
|
11 |
+
</body>
|
12 |
+
</html>
|