Spaces:
Sleeping
Sleeping
npc start
Browse files- app.py +17 -0
- config.py +0 -0
- npc_social_network/__init__.py +0 -0
- npc_social_network/models/npc.py +0 -0
- npc_social_network/routes/npc_route.py +8 -0
- npc_social_network/static/style.css +0 -0
- npc_social_network/templates/base.html +12 -0
- npc_social_network/templates/chat.html +12 -0
- test.ipynb +10 -0
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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__)
|
7 |
+
|
8 |
+
# Blueprint 등록
|
9 |
+
app.register_blueprint(npc_bp)
|
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)
|
config.py
ADDED
File without changes
|
npc_social_network/__init__.py
ADDED
File without changes
|
npc_social_network/models/npc.py
ADDED
File without changes
|
npc_social_network/routes/npc_route.py
ADDED
@@ -0,0 +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")
|
npc_social_network/static/style.css
ADDED
File without changes
|
npc_social_network/templates/base.html
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- npc_social_network/templates/base.html -->
|
2 |
+
<!DOCTYPE html>
|
3 |
+
<html lang="en">
|
4 |
+
<head>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Document</title>
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
|
11 |
+
</body>
|
12 |
+
</html>
|
npc_social_network/templates/chat.html
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- npc_social_network/templates/chat.html-->
|
2 |
+
<!DOCTYPE html>
|
3 |
+
<html lang="en">
|
4 |
+
<head>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Document</title>
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
|
11 |
+
</body>
|
12 |
+
</html>
|
test.ipynb
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [],
|
3 |
+
"metadata": {
|
4 |
+
"language_info": {
|
5 |
+
"name": "python"
|
6 |
+
}
|
7 |
+
},
|
8 |
+
"nbformat": 4,
|
9 |
+
"nbformat_minor": 5
|
10 |
+
}
|