1.安装 mysql-python 报错:
sh: mysql_config: not found
Traceback (most recent call last):
File "setup.py", line 15, in <module>
metadata, options = get_config()
File "/home/zhxia/apps/source/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "/home/zhxia/apps/source/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
原因是没有安装:libmysqlclient-dev
sudo apt-get install libmysqlclient-dev
找到mysql_config文件的路径: /usr/bin/mysql_config
sudo updatedb # 要执行很久 十分钟??? 搜了下好像说是 更新 数据库 配置信息
locate mysql_config
2.数据库迁移报错:没有 "flask模块"
不是因为循环导包, 而是因为"当前终端"没有在对应的"虚拟环境"
3.requirements.txt 导入报错有可能是pymysql的锅
需要额外安装 pymysql,否则可能在执行 python xxx.py db init 迁移失败
4.静态文件转发逻辑编写

5. 不可以 from . import *

6.获取的 g.user.houses 是一个列表!!!

即使只有一个 对象 也是这个东西: [ object ], 想要使用 需要用索引 list[0] 去取
7.可以 在 .init 初始化文件中 print(app.url_map),显示路由列表
不能用 current_app.logger.debug(app.url_map),否则:
raise RuntimeError('working outside of application context')
RuntimeError: working outside of application context
8.首页音乐插件
<div id="mmms" style="position:fixed; width:2.5%; right:8%; bottom:0px; ">
<audio src="http://img.tukuppt.com/origin_music/00/02/79/pd-5b766fc50add6481.mp3" loop="1oop" autoplay="autoplay" controls="controls"></audio>
</div>
9. 价格 显示错误


10.qq客服功能:
<div id="zaixian" class="axb" style=" width:40%; height:10%; line-height:35px;position: fixed;left: 0px;bottom: 0px;">
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1026412268&site=qq&menu=yes">
<img border="0" src="http://wpa.qq.com/pa?p=2:客服的QQ号:52" alt="点击这里给我发消息" title="点击这里给我发消息"/>在线客服</a>
</div>

11.房东查看处理客户订单


12.身份验证只能输入一次的 操作逻辑:

13.前端传回住房最大时间 为 0,会存入数据库0 ,无法进行后续校验

网友评论