1. 运行manage.py任务  makemigrations时,报错:

doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

解决:在全局setting.py的 INSTALLED_APPS中 添加 app的名字,如

2. 在添加一个生日字段 (日期类型)时报错:

You are trying to add a non-nullable field 'email' to user without a default; we can't do that (the database needs something to populate existing rows).
Please select a fix:
1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
2) Quit, and let me add a default in models.py

解决:输入 1    会显示

      Please enter the default value now, as valid Python
      The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now
      Type 'exit' to exit this prompt

     输入 timezone.now

Django学习报错记录的更多相关文章

  1. python---补充django中文报错(1),Django2.7使用sys.setdefaultencoding('utf-8'),以及使用reload(sys)原因

    SyntaxError at /blog/ news/story Non-ASCII character , but no encoding declared; see http://python.o ...

  2. django运行报错TypeError: object supporting the buffer API required

    运行django项目报错:TypeError: object supporting the buffer API required 解决方案: 将settings.py中数据库的密码改成字符串格式 源 ...

  3. 报错记录(xml抬头报错)

    报错记录(xml抬头报错) Referenced file contains errors (http://www.springframework.org/schema/beans/spring-be ...

  4. IDEA 报错记录

    IDEA 报错记录 Process finished with exit code 0 这种主要是配了默认的 Tomcat ,然后又配置了外部的 Tomcat.解决办法,注释掉默认的: <dep ...

  5. Spring Boot 报错记录

    Spring Boot 报错记录 由于新建的项目没有配置数据库连接启动报错,可以通过取消自动数据源自动配置来解决 解决方案1: @SpringBootApplication(exclude = Dat ...

  6. Django独有报错的原因和解决

    RuntimeError at /login You called this URL via POST, but the URL doesn't end in a slash and you have ...

  7. django 运行报错汇总

    记录自己在使用django开发过程中遇到的问题,不间断更新. (1) 独立运行普通Python脚本调用django中定义的类报错 报错信息: django.core.exceptions.Improp ...

  8. python3 Django框架报错(备忘录)

    这篇博客主要总结的学习Django框架中,遇到的报错如何去解决问题: 1.decimal.InvalidOperation: decimal.InvalidOperation: [<class ...

  9. 报错记录:getOutputStream() has already been called for this response

    仅作记录:参考文章:http://www.blogjava.net/vickzhu/archive/2008/11/03/238337.html 报错信息: java.lang.IllegalStat ...

随机推荐

  1. 从Chrome源码看JS Array的实现

    .aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto } .crayon-line spa ...

  2. socket.io的编程实现

    socket.io实例 一.环境要求 客户端需要引用socket.io.js文件 服务端需要按照node环境,以及npm install socket.io用来安装服务端的socket.io 二.客户 ...

  3. js中的事件委托详解

    概述: 那什么叫事件委托呢?它还有一个名字叫事件代理,JavaScript高级程序设计上讲:事件委托就是利用事件冒泡,只指定一个事件处理程序,就可以管理某一类型的所有事件.那这是什么意思呢?网上的各位 ...

  4. java集合的核心知识

    1.    集合 1.1. 什么是集合 存储对象的容器,面向对象语言对事物的体现都是以对象的形式,所以为了方便对多个对象的操作,存储对象,集合是存储对象最常用的一种方式. 集合的出现就是为了持有对象. ...

  5. bzoj4031 [HEOI2015]小Z的房间

    Description 你突然有了一个大房子,房子里面有一些房间.事实上,你的房子可以看做是一个包含n*m个格子的格状矩形,每个格子是一个房间或者是一个柱子.在一开始的时候,相邻的格子之间都有墙隔着. ...

  6. [工具技巧] SecureCRT使用技巧 V1.0

    本文档适用对象为需要使用secureCRT做系统或网络等调试的工程师,其必须有用过该款软件,基础功能会使用.对于那些需要修改大量设备的配置时像远程升级等等,更应该学习本文档. 1       Secu ...

  7. FrameBuffer系列 之 相关结构与结构体

    在linux中,fb设备驱动的源码主要在Fb.h (linux2.6.28\include\linux)和Fbmem.c(linux2.6.28\drivers\video)两个文件中,它们是fb设备 ...

  8. openfire+smack 实现即时通讯基本框架

    smack jar下载地址 http://www.igniterealtime.org/downloads/download-landing.jsp?file=smack/smack_3_2_2.zi ...

  9. 为RecyclerView的item之间设置相同的间距

    项目中经常碰到列表当中的每一项之间需要设置间距的问题,我们可以通过给列表中的每一项设置margin值来实现,例如纵向的间距可以给每一项设置right_margin,这种方法下,整个列表的最左边会紧贴屏 ...

  10. java I/O :RandomAccessFile