zoukankan      html  css  js  c++  java
  • TypeError at /admin/booktest/bookinfo/ expected string or buffer

    问题描述:

    Request Method: GET
    Request URL: http://127.0.0.1:8000/admin/booktest/bookinfo/
    Django Version: 1.8.2
    Exception Type: TypeError
    Exception Value:
    expected string or buffer
    Exception Location: /home/python/.virtualenvs/h1/local/lib/python2.7/site-packages/django/utils/dateparse.py in parse_datetime, line 93
    Python Executable: /home/python/.virtualenvs/h1/bin/python
    Python Version: 2.7.12
    Python Path:
    ['/home/python/Desktop/projects/test1',
     '/home/python/.virtualenvs/h1/lib/python2.7',
     '/home/python/.virtualenvs/h1/lib/python2.7/plat-x86_64-linux-gnu',
     '/home/python/.virtualenvs/h1/lib/python2.7/lib-tk',
     '/home/python/.virtualenvs/h1/lib/python2.7/lib-old',
     '/home/python/.virtualenvs/h1/lib/python2.7/lib-dynload',
     '/usr/lib/python2.7',
     '/usr/lib/python2.7/plat-x86_64-linux-gnu',
     '/usr/lib/python2.7/lib-tk',
     '/home/python/.virtualenvs/h1/local/lib/python2.7/site-packages',
     '/home/python/.virtualenvs/h1/lib/python2.7/site-packages']
    Server time: 星期一, 7 五月 2018 22:48:29 +0800

    原因

    这是因为:创建的应用里面的模型里面的类的属性修改之后没有重新生成迁移。导致数据库传过来的数据表不能和python交互。重新用python manage.py生成迁移。然后创建超级用户。最后开启服务器。问题解决。

    本文来自博客园,作者:江湖混子,转载请注明原文链接:https://www.cnblogs.com/huao990928/p/11829508.html

  • 相关阅读:
    CentOS 6.5 安装 VNC Server
    vs2008出错
    MySQL 尽量避免使用 TIMESTAMP
    excel中生成32位随机id
    库存扣减和锁
    精通 MySQL 索引
    Java代码性能优化
    RocketMQ 消息丢失场景分析及如何解决
    Java 8 的内存结构
    Spring Boot + MyBatis + MySQL 实现读写分离
  • 原文地址:https://www.cnblogs.com/huao990928/p/11829508.html
Copyright © 2011-2022 走看看