作者的挫作,《Python Linux系统管理与自动化运维》,敬请品鉴。
完整的目录在这里。
在MySQL中导入数据库:
mysql -h127.0.0.1 -ulaimingxing -plaimingxing -Dtest -P3306 < schema.sql
修改app.py,配置访问数据库的用户名、密码和端口号。
- 密码加密
- 用户注册
- 以用户为维度,管理TodoList
作者的挫作,《Python Linux系统管理与自动化运维》,敬请品鉴。
完整的目录在这里。
在MySQL中导入数据库:
mysql -h127.0.0.1 -ulaimingxing -plaimingxing -Dtest -P3306 < schema.sql
修改app.py,配置访问数据库的用户名、密码和端口号。
在html里面我也不会找ADD这个键对应的类是哪个。如果独立写出来应该如何修改呢?与修改删除操作一样吗?目前的代码里,是不是通过请求方式的不同来判断的显示和添加呢?
Hello, When I register, I can not accept the email to activate my account. How to solve this problem?
我平时使用pymysql链接mysql数据库,电脑上只安装了pymysql,运行项目时报错“No module named 'MySQLdb'”。
看了requirements.txt内又没有列出这个模块,有点摸不着头脑。
折腾了很久才在知乎找到答案。https://www.zhihu.com/question/29719547
app.config['SQLALCHEMY_DATABASE_URI'] 如下定义时会程序会引用MySQLdb模块:
app.config['SQLALCHEMY_DATABASE_URI'] = "mysql://laimingxing:[email protected]/test"
如下定义时才会引用pymysql模块:
app.config['SQLALCHEMY_DATABASE_URI'] = "mysql+pymysql://laimingxing:[email protected]/test"
点击了登陆过后报
Exception
Exception: No user_loader has been installed for this LoginManager. Add one with the 'LoginManager.user_loader' decorator.
查阅了flask的文档关于user_loader的部分
if self.user_callback is None:
raise Exception(
"No user_loader has been installed for this "
"LoginManager. Add one with the "
"'LoginManager.user_loader' decorator.")
不知道为什么会是None,与数据库有关系吗。不知道为什么出现这样的情况。望赐教
运行不起来会提示这个问题,切换了各种版本,还是不行
我想 实现 登陆进去之后只显示 当前用户创建的title
需要获取当前登录用户的id 请问怎么获取呢?
readme中 乐岸教育教程http://wwww.leanntech.com
wwww
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.