Django版本:1.11.15

使用session的代码:
request.session['key'] = value

运行后报错:
no such table: django_session

解决办法:

执行如下命令,初始化数据库
python manage.py migrate
再次运行,可以了

初始化一下数据库就解决了。
据说1.9之前的版本初始化数据库命令:
python manage.py syscdb

done!

django使用session报错:no such table: django_session的更多相关文章

  1. 报错: no such table:django_session解决方式

    如果出现这个错误 “no such table:django_session” 这个错误跟Session的机制有关, 既然要从Web服务器端来记录用户信息, 那么一定要有存放用户session id对 ...

  2. Django迁移数据库报错

    Django迁移数据库报错 table "xxx" already exists错误 django在migrate时报错django migrate error: table 'x ...

  3. CodeIgniter 3.0+ 部署linux环境 session报错

    codeigniter Message: mkdir(): Invalid path Filename: drivers/Session_files_driver.php 看起来像权限问题,在默认情况 ...

  4. django startproject xxx:报错UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128)

    django startproject xxx:报错UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: o ...

  5. django正常运行确报错的解决方法

    django正常运行却报错的处理方法 出处 : https://www.infvie.com/ops-notes/django-normal-operation-error 报错一:self._soc ...

  6. ASP.NET Global Application_Error事件中访问Session报错 解决

    报错信息:会话状态在此上下文中不可用 protected void Application_Error(object sender, EventArgs e) { //以此判断是否可用Session ...

  7. Django:django-cors-headers 报错no module named "corsheaders"

    django跨域使用 pip install django-cors-headers 然后在settings文件中加上参数设置 # app配置 INSTALLED_APPS = [ 'django.c ...

  8. .NET CORE 使用Session报错:Session has not been configured for this application or request

    报错信息:Session has not been configured for this application or request 解决方案:在Startup.cs文件中的Configure方法 ...

  9. django调用py报错 django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured.

    完整报错信息如下 django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, bu ...

随机推荐

  1. Codex Delphi Expert

    https://www.delphiworlds.com/codex/?tdsourcetag=s_pcqq_aiomsg Codex是什么? 是一个可以安装到Delphi IDE中的专家 有助于提高 ...

  2. Go Storm Is Coming!

    goland---http://idea.youbbs.org .................................................................... ...

  3. flex 布局 出滚动条的操作

    flex布局也是可以初横向滚动条的哦, 设置 flex-wrap:nowrap ,然后横向的固定宽度超过100% 则出滚动条

  4. svg相关

    1.指定点缩放公式 translate(-centerX*(factor-1), -centerY*(factor-1)) scale(factor)

  5. 2.21 JS处理滚动条

    2.21 JS处理滚动条 前言    selenium并不是万能的,有时候页面上操作无法实现的,这时候就需要借助JS来完成了.常见场景:当页面上的元素超过一屏后,想操作屏幕下方的元素,是不能直接定位到 ...

  6. Python学习笔记第八周

    目录: 一.基础概念 1.动态导入模块 2.断言机制 3.SocketServer 二.作业 FTP服务器 三.单独注明 1.类中装饰器 2.进度条 一.基础概念 1.动态导入模块 有时在编程过程中, ...

  7. vmware安装centos问题

    * 选择安装后,一直黑屏 重新启动电脑,在启动界面进入BIOS设置,找到Intel (R) Virtualization Technology,设置成Enabled,保存设置以后重新启动电脑,问题解决 ...

  8. Python之路,第一篇:Python入门与基础

    第一篇:Python入门与基础 1,什么是python? Python 是一个高层次的结合了解释性.编译性.互动性和面向对象的脚本语言. 2,python的特征: (1)易于学习,易于利用: (2)开 ...

  9. render finished

  10. [LeetCode&Python] Problem 21. Merge Two Sorted Lists

    Merge two sorted linked lists and return it as a new list. The new list should be made by splicing t ...