zoukankan      html  css  js  c++  java
  • 【Django】执行manage.py test报数据库错误

    运行python manage.py test报错

    File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)

    ...

    return Database.Cursor.execute(self, query, params)
    django.db.utils.OperationalError: no such table: lists_item

    解决方案:

    1、运行python manage.py migrate

    2、运行python manage.py test依然报错

    3、运行python manage.py migrate,提示运行manage.py makemigrations

    4、运行python manage.py makemigrations

  • 相关阅读:
    Nginx
    Influxdb
    Gitlab
    Git
    Gogs
    Dockerfile
    Docker Data
    My Projects
    中文学习
    科技精选
  • 原文地址:https://www.cnblogs.com/zonglr/p/9297351.html
Copyright © 2011-2022 走看看