django 报错信息汇总

问题一:同步数据库,报错信息:TypeError: __init__() got an unexpected keyword argument 'maxlength'

django 低版本的格式maxlength ,修改成max_length。

 问题二:在setting.py中添加

'django.middleware.locale.LocaleMiddlewar'

 再次运行 python manage.py runserver 8000

报错 :

A server error occurred.  Please contact the administrator.

注释掉上面setting.py 的设置,就不报错了。

----------------------------------------------------------------------------------------------------------

问题2:

'module' object has no attribute 'index'

原因是在views.py  中没有添加

index 的方法

----------------------------------------------------------------------------------------------------------

猜你喜欢

转载自km-moon11.iteye.com/blog/2352207