为什么我api开始进的去,后面就不行了

来源:8-1 小程序会员登录和注册1

SuperMan_GYD

2020-02-12

图片描述
图片描述
图片描述图片描述

写回答

4回答

编程浪子

2020-02-12

你好

根据你的截图我没办法猜测 我个人猜测 应该是__init__.py 文件 你可能写错了,左右都是两个下划线。

因为看起来看不出来你是一个还是多个。是在不行,你把我给你的源码这个文件复制替换掉试试


https://git.imooc.com/coding-265/coding-265/src/master/%e5%ae%8c%e6%95%b4%e6%ba%90%e7%a0%81/web/controllers/api/__init__.py 

0
4
SuperMan_GYD
非常感谢!
2020-04-15
共4条回复

SuperMan_GYD

提问者

2020-02-12

//img.mukewang.com/szimg/5e440fdf0980f48f07490397.jpg已经发给您

0
0

编程浪子

2020-02-12

你好

你把controller的目录结构给我看看,我个人猜测 应该是__init__.py 文件 你可能写错了,左右都是两个下划线

0
1
SuperMan_GYD
发给您了
2020-02-12
共1条回复

SuperMan_GYD

提问者

2020-02-12

2020-02-12 19:55:45,654 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'sql_mode'

2020-02-12 19:55:45,655 INFO sqlalchemy.engine.base.Engine ()

2020-02-12 19:55:45,795 INFO sqlalchemy.engine.base.Engine SHOW VARIABLES LIKE 'lower_case_table_names'

2020-02-12 19:55:45,796 INFO sqlalchemy.engine.base.Engine ()

2020-02-12 19:55:45,806 INFO sqlalchemy.engine.base.Engine SELECT DATABASE()

2020-02-12 19:55:45,806 INFO sqlalchemy.engine.base.Engine ()

2020-02-12 19:55:45,809 INFO sqlalchemy.engine.base.Engine show collation where `Charset` = 'utf8mb4' and `Collation` = 'utf8mb4_bin'

2020-02-12 19:55:45,810 INFO sqlalchemy.engine.base.Engine ()

2020-02-12 19:55:45,877 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS CHAR(60)) AS anon_1

2020-02-12 19:55:45,877 INFO sqlalchemy.engine.base.Engine ()

2020-02-12 19:55:45,879 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS CHAR(60)) AS anon_1

2020-02-12 19:55:45,881 INFO sqlalchemy.engine.base.Engine ()

2020-02-12 19:55:45,883 INFO sqlalchemy.engine.base.Engine SELECT CAST('test collated returns' AS CHAR CHARACTER SET utf8mb4) COLLATE utf8mb4_bi

n AS anon_1

2020-02-12 19:55:45,883 INFO sqlalchemy.engine.base.Engine ()

2020-02-12 19:55:45,886 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)

2020-02-12 19:55:45,898 INFO sqlalchemy.engine.base.Engine SELECT user.uid AS user_uid, user.nickname AS user_nickname, user.mobile AS user_mobi

le, user.email AS user_email, user.sex AS user_sex, user.avatar AS user_avatar, user.login_name AS user_login_name, user.login_pwd AS user_login

_pwd, user.login_salt AS user_login_salt, user.status AS user_status, user.updated_time AS user_updated_time, user.created_time AS user_created_

time

FROM user

WHERE user.uid = %s

 LIMIT %s

2020-02-12 19:55:45,901 INFO sqlalchemy.engine.base.Engine ('1', 1)

2020-02-12 19:55:45,916 INFO sqlalchemy.engine.base.Engine INSERT INTO app_access_log (uid, target_url, query_params, ua, ip, created_time) VALU

ES (%s, %s, %s, %s, %s, %s)

2020-02-12 19:55:45,918 INFO sqlalchemy.engine.base.Engine (1, 'http://127.0.0.1:9999/', '{}', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit

/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3741.400 QQBrowser/10.5.3863.400', '127.0.0.1', '2020-02-12 19:55:45')

2020-02-12 19:55:45,947 INFO sqlalchemy.engine.base.Engine COMMIT

2020-02-12 19:55:46,108 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)

2020-02-12 19:55:46,109 INFO sqlalchemy.engine.base.Engine SELECT user.uid AS user_uid, user.nickname AS user_nickname, user.mobile AS user_mobi

le, user.email AS user_email, user.sex AS user_sex, user.avatar AS user_avatar, user.login_name AS user_login_name, user.login_pwd AS user_login

_pwd, user.login_salt AS user_login_salt, user.status AS user_status, user.updated_time AS user_updated_time, user.created_time AS user_created_

time

FROM user

WHERE user.uid = %s

2020-02-12 19:55:46,111 INFO sqlalchemy.engine.base.Engine (1,)

2020-02-12 19:55:46,115 INFO sqlalchemy.engine.base.Engine ROLLBACK

127.0.0.1 - - [12/Feb/2020 19:55:46] "GET / HTTP/1.1" 200 -

127.0.0.1 - - [12/Feb/2020 19:55:46] "GET /static/bootstrap/bootstrap.min.css?ver=1581508546 HTTP/1.1" 200 -

127.0.0.1 - - [12/Feb/2020 19:55:46] "GET /static/font-awesome/css/font-awesome.min.css?ver=1581508546 HTTP/1.1" 200 -

127.0.0.1 - - [12/Feb/2020 19:55:46] "GET /static/css/style.css?ver=1581508546 HTTP/1.1" 200 -

127.0.0.1 - - [12/Feb/2020 19:55:46] "GET /static/images/common/logo.png?ver=1581508546 HTTP/1.1" 200 -

127.0.0.1 - - [12/Feb/2020 19:55:46] "GET /static/images/common/avatar.png?ver=1581508546 HTTP/1.1" 200 -

127.0.0.1 - - [12/Feb/2020 19:55:47] "GET /static/bootstrap/bootstrap.min.js?ver=1581508546 HTTP/1.1" 200 -

127.0.0.1 - - [12/Feb/2020 19:55:47] "GET /static/plugins/jquery-2.1.1.js?ver=1581508546 HTTP/1.1" 200 -

127.0.0.1 - - [12/Feb/2020 19:55:47] "GET /static/plugins/layer/layer.js?ver=1581508546 HTTP/1.1" 200 -

127.0.0.1 - - [12/Feb/2020 19:55:47] "GET /static/js/common.js?ver=1581508546 HTTP/1.1" 200 -

2020-02-12 19:55:54,617 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)

2020-02-12 19:55:54,620 INFO sqlalchemy.engine.base.Engine SELECT user.uid AS user_uid, user.nickname AS user_nickname, user.mobile AS user_mobi

le, user.email AS user_email, user.sex AS user_sex, user.avatar AS user_avatar, user.login_name AS user_login_name, user.login_pwd AS user_login

_pwd, user.login_salt AS user_login_salt, user.status AS user_status, user.updated_time AS user_updated_time, user.created_time AS user_created_

time

FROM user

WHERE user.uid = %s

 LIMIT %s

2020-02-12 19:55:54,631 INFO sqlalchemy.engine.base.Engine ('1', 1)

2020-02-12 19:55:54,663 INFO sqlalchemy.engine.base.Engine INSERT INTO app_access_log (uid, target_url, query_params, ua, ip, created_time) VALU

ES (%s, %s, %s, %s, %s, %s)

2020-02-12 19:55:54,675 INFO sqlalchemy.engine.base.Engine (1, 'http://127.0.0.1:9999/api', '{}', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWeb

Kit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3741.400 QQBrowser/10.5.3863.400', '127.0.0.1', '2020-02-12 19:55:54'

)

2020-02-12 19:55:54,742 INFO sqlalchemy.engine.base.Engine COMMIT

127.0.0.1 - - [12/Feb/2020 19:55:54] "GET /api HTTP/1.1" 404 -


0
0

Python Flask构建微信小程序订餐系统(可用于毕设)

微信小程序 + Python Flask 打造订餐系统全栈应用,可用于毕设。

1709 学习 · 1904 问题

查看课程