test
首先,项目的目录是:
D:.
│ config.ini
│ requirements.txt
│ run.sh
│
├─.idea
│ │ .gitignore
│ │ luyitiannu.iml
│ │ misc.xml
│ │ modules.xml
│ │ vcs.xml
│ │ workspace.xml
│ │
│ └─inspectionProfiles
│ profiles_settings.xml
│
├─app
│ │ auth.py
│ │ config.py
│ │ models.py
│ │ __init__.py
│ │
│ └─__pycache__
│ auth.cpython-310.pyc
│ config.cpython-310.pyc
│ models.cpython-310.pyc
│ __init__.cpython-310.pyc
│
├─tests
│ conftest.py
│ test_api.py
│ __init__.py
│
└─venv
│ .gitignore
│ pyvenv.cfg
│
├─Lib
│ └─site-packages
其中,app/auth.py:
from flask import Blueprint
from .models import db, User
bp = Blueprint('auth', __name__, url_prefix='/auth')
@bp.route('/login')
def login():
return 'Hello, World!'
全世界的程序员们联合起来吧!

浙公网安备 33010602011771号