lack30 / flaskvue Goto Github PK
View Code? Open in Web Editor NEWflask + vue
flask + vue
pip install sqlalchemy-migrate
curl -i -u eyJhbGciOiJIUzUxMiIsImlhdCI6MTU3NzYwMjQ4OCwiZXhwIjoxNTc3NjAzMDg4fQ.eyJpZCI6MX0.1Z8MtJ6qlvFFvRrLIjhchL7ipB6aJgAXOzLU3Ir94owEhtmNWEjglAZTbITpljEMS960jPGEaeS7ouE5tD76jQ -X GET -H "Content-Type: application/json" http://127.0.0.1:8000/api/login
Enter host password for user 'eyJhbGciOiJIUzUxMiIsImlhdCI6MTU3NzYwMjQ4OCwiZXhwIjoxNTc3NjAzMDg4fQ.eyJpZCI6MX0.1Z8MtJ6qlvFFvRrLIjhchL7ipB6aJgAXOzLU3Ir94owEhtmNWEjglAZTbITpljEMS960jPGEaeS7ouE5tD76jQ':
HTTP/1.0 401 UNAUTHORIZED
Content-Type: text/html; charset=utf-8
Content-Length: 19
WWW-Authenticate: Basic realm="Authentication Required"
Access-Control-Allow-Origin: *
Server: Werkzeug/0.16.0 Python/3.7.4
Date: Sun, 29 Dec 2019 07:01:35 GMT
Unauthorized Accessmikel_pan
需要输入一个密码: 但是他无法验证这个密码
curl -i -H "Authorization:eyJhbGciOiJIUzUxMiIsImlhdCI6MTU3NzYwMjQ4OCwiZXhwIjoxNTc3NjAzMDg4fQ.eyJpZCI6MX0.1Z8MtJ6qlvFFvRrLIjhchL7ipB6aJgAXOzLU3Ir94owEhtmNWEjglAZTbITpljEMS960jPGEaeS7ouE5tD76jQ" -X GET -H "Content-Type: application/json" http://127.0.0.1:8000/api/login
HTTP/1.0 401 UNAUTHORIZED
Content-Type: text/html; charset=utf-8
Content-Length: 19
WWW-Authenticate: Basic realm="Authentication Required"
Access-Control-Allow-Origin: *
Server: Werkzeug/0.16.0 Python/3.7.4
Date: Sun, 29 Dec 2019 07:02:56 GMT
Unauthorized Access
在Flask中连接MySQL时出现ModuleNotFoundError: No module named 'MySQLdb'错误,只要在配置SQLALCHEMY_DATABASE_URI时,加上一个pymysql就可以了:
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://root:dzd123@localhost/你的数据库名' ,
当然,前提是要已经安装了pymysql,如果没有装pymysql,是会报ModuleNotFoundError: No module named 'pymysql'错误的,安装命令也很简单:pip install pymysql
flask-sqlalchemy instead of flask-sqlachemy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.