begin mg tut framework in be
This commit is contained in:
parent
9b79a3796b
commit
becc234263
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
gitea/
|
gitea/
|
||||||
.env
|
.env
|
||||||
pmb-pf/
|
pmb-pf/
|
||||||
backend/giapp.py
|
venv
|
||||||
|
|
||||||
|
|
||||||
|
2
backend/.flaskenv
Normal file
2
backend/.flaskenv
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
FLASK_APP=microblog.py
|
||||||
|
|
4
backend/README.md
Normal file
4
backend/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
pip:
|
||||||
|
pip install flask
|
||||||
|
pip install python-dotenv
|
6
backend/app/__init__.py
Normal file
6
backend/app/__init__.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
from flask import Flask
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
from app import routes
|
||||||
|
|
7
backend/app/routes.py
Normal file
7
backend/app/routes.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
from app import app
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
@app.route('/index')
|
||||||
|
def index():
|
||||||
|
return "Hello, World!"
|
||||||
|
|
2
backend/microblog.py
Normal file
2
backend/microblog.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from app import app
|
||||||
|
|
8
backend/requirements.txt
Executable file → Normal file
8
backend/requirements.txt
Executable file → Normal file
@ -1,4 +1,8 @@
|
|||||||
|
blinker==1.8.2
|
||||||
|
click==8.1.7
|
||||||
Flask==3.0.3
|
Flask==3.0.3
|
||||||
|
itsdangerous==2.2.0
|
||||||
|
Jinja2==3.1.4
|
||||||
|
MarkupSafe==2.1.5
|
||||||
|
python-dotenv==1.0.1
|
||||||
Werkzeug==3.0.3
|
Werkzeug==3.0.3
|
||||||
mysql-connector-python
|
|
||||||
pyuwsgi
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
Flask==2.0.1
|
|
||||||
mysql-connector==2.2.9
|
|
11
backend/templates/about.html
Normal file
11
backend/templates/about.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>About</h1>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
9
backend/templates/basictemp.html
Normal file
9
backend/templates/basictemp.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
11
backend/templates/home.html
Normal file
11
backend/templates/home.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>Home</h1>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user