Skip to content

Commit 2c0420a

Browse files
committed
bootstrap 적용해보기
1 parent 8832b4f commit 2c0420a

23 files changed

Lines changed: 9783 additions & 3 deletions

.DS_Store

6 KB
Binary file not shown.

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ flask-sqlalchemy = "*"
1515
flask-migrate = "*"
1616
pymysql = "*"
1717
flask-restplus = "*"
18+
flask-bootstrap = "*"
1819

1920
[requires]
2021
python_version = "3.7"

Pipfile.lock

Lines changed: 21 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/__init__.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
app init
33
"""
44

5-
from flask import Flask
5+
from flask import Flask, render_template
66
from flask_restplus import Resource, Api, fields, reqparse
77
from flask_sqlalchemy import SQLAlchemy
88
from sqlalchemy.exc import SQLAlchemyError
99
from sqlalchemy.sql import text
10+
from flask_bootstrap import Bootstrap
1011

1112
DB = SQLAlchemy()
1213
SQLALCHEMY_DATABASE_URI = \
@@ -40,6 +41,7 @@ def create_app() -> (Flask):
4041
# 나중에 config는 다 빼야 할 것 같다.
4142
app = Flask(__name__)
4243
app.app_context().push()
44+
Bootstrap(app)
4345
app.config['SQLALCHEMY_DATABASE_URI'] = SQLALCHEMY_DATABASE_URI.format(
4446
USER="root",
4547
PASSWORD="1234",
@@ -96,12 +98,20 @@ def post(self):
9698
DB.session.close()
9799
return message
98100

101+
102+
99103
""" app.route part """
100104
# 나중에 route는 다 빼야 할 것 같다.
101105
@app.route("/index")
102106
def index():
103107
""" / url index """
104-
return "<h1>Hello World ! <br> This is index page</h1>"
108+
return render_template('/index.html')
105109

110+
@app.route("/register")
111+
def register():
112+
""" 회원가입 페이지 """
113+
return render_template('/register.html')
114+
115+
106116
""" return part """
107117
return app

app/static/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)