theitroad
  • 首页
  • 解决方案
当前位置:theitroad>Django报错-AttributeError:'WSGIRequest'object has no attribute'session

Django报错-AttributeError:'WSGIRequest'object has no attribute'session

时间:2019-08-20 17:58:06  来源:igfitidea点击:

在处理Django时,我收到了一条错误消息 **“AttributeError:'WSGIRequest'object has no attribute'session'”

解决方法

编辑settings.py文件

添加ALLOWED_HOSTS,其中FQDN是服务器的FQDN或者IP,比如 django.itroad.com.com

vi /path-of-project/project-name/project-name/settings.py

ALLOWED_HOSTS=['FQDN']

重启Django服务

上一篇
下一篇

相关推荐

Powershell-For循环

Powershell-For循环

Powershell-ForEach循环

Powershell-ForEach循环

Powershell-While循环

Powershell-While循环

Powershell-Do..While循环

Powershell-Do..While循环

相关推荐
  • 如何在Ubuntu中安装Fluxbox
  • Apache2.4中如何限制指定的主机和IP访问
  • 在linux中如何不重启增加交换空间
  • 如何解决代理使用密钥ssh签名认证失败
  • 在RHEL/CentOS上如何只允许Wheel组的用户使用su命令
  • freebsd9.0中如何允许root用户进行ssh登录
  • 在防火墙iptable中开放wget和yum端口
  • Another MySQL daemon already running with the same unix socket
  • /usr/bin/python: not found
最近更新
  • /usr/bin/python: not found
  • Another MySQL daemon already running with the same unix socket
  • 在防火墙iptable中开放wget和yum端口
  • freebsd9.0中如何允许root用户进行ssh登录
  • 在RHEL/CentOS上如何只允许Wheel组的用户使用su命令
  • 如何解决代理使用密钥ssh签名认证失败
  • 在linux中如何不重启增加交换空间
  • Apache2.4中如何限制指定的主机和IP访问
  • 如何在Ubuntu中安装Fluxbox
  • Linux cd命令
标签

theitroad

才须学也。非学无以广才,非志无以成学。莫等闲,白了少年头,空悲切。

本站导航
  • 网站地图
关于
  • 关于我们
  • 隐私政策
友情链接
    © 2020 版权所有
    theitroad