随笔分类 -  django

django默认后台使用
摘要:1.初始化数据python manage.py migrate 2.创建超级用户python manage.py createsuperuser 然后按照提示输入就可以了 3.admin管理页面找不到base.css,dashboard.css文件 在settings文件中设置STATIC_ROOT 阅读全文

posted @ 2018-09-12 10:16 zqifa 阅读(257) 评论(0) 推荐(0) 编辑

django csrf使用教程,解决Forbidden (403)CSRF verification failed. Request aborted.
摘要:Django版本号:1.11.15 django中post请求报错:Forbidden (403)CSRF verification failed. Request aborted. HelpReason given for failure: CSRF cookie not set. 方法1:不使用 阅读全文

posted @ 2018-09-05 15:38 zqifa 阅读(5295) 评论(0) 推荐(3) 编辑

django ajax报错解决:You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set.
摘要:Django版本号:1.11.15 django中ajax请求报错:You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirec 阅读全文

posted @ 2018-09-05 15:34 zqifa 阅读(1758) 评论(0) 推荐(0) 编辑

django使用session报错:no such table: django_session
摘要:Django版本:1.11.15 使用session的代码:request.session['key'] = value 运行后报错:no such table: django_session 解决办法: 执行如下命令,初始化数据库python manage.py migrate再次运行,可以了 初 阅读全文

posted @ 2018-09-05 11:59 zqifa 阅读(468) 评论(0) 推荐(0) 编辑

django报错解决:view must be a callable or a list/tuple in the case of include().
摘要:django版本:1.11.15 django应用,修改urls.py后,访问报错:TypeError at /view must be a callable or a list/tuple in the case of include(). 修改后的urls.py文件:from django.co 阅读全文

posted @ 2018-09-03 17:32 zqifa 阅读(1942) 评论(0) 推荐(0) 编辑

django报错解决:Invalid HTTP_HOST header: 'xxx.com'. You may need to add u'xxx.com' to ALLOWED_HOSTS.
摘要:django版本:1.11.15 使用uwsgi+nginx运行django程序,出现报错,报错为:Invalid HTTP_HOST header: 'xxx.com:82'. You may need to add u'xxx.com' to ALLOWED_HOSTS.xxx.com为绑定的测 阅读全文

posted @ 2018-09-03 17:18 zqifa 阅读(4158) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示