rorshi commited on
Commit
9625f38
·
1 Parent(s): 7cfe55a

portfolio base set

Browse files
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 "<h1>Welcome to the Portfolio</h1><a href='/npc_social'>Go to Project 1</a>"
14
 
15
- if __name__ == '__main__':
16
- app = create_app()
17
- app.run(debug=True)
 
 
 
 
 
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("index.html")
 
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>