1 ERRORS:
app0.userModel.nameM: (fields.E120) CharFields must define a 'max_length' attribute.
app0.userModel.passwordM: (fields.E120) CharFields must define a 'max_length' attribute.
djiango模型必须有一些参数的定义,例如CharFields并不是可以null的。
2 [15/Feb/2018 18:29:35] "POST /login/ HTTP/1.1" 200 414
Not Found: /
[15/Feb/2018 18:33:19] "GET / HTTP/1.1" 404 2130
[15/Feb/2018 18:33:24] "GET /login/ HTTP/1.1" 200 414
y-----------------------------
[15/Feb/2018 18:33:29] "POST /login/ HTTP/1.1" 200 414
这个问题笔者相信会有新手遇到的,困惑了好久。解决了 问题在于form表单提取识别的是name而不是id.
看似简单,容易犯的错误。提给python后台处理的是name。