django 2.0.7异常类型:operationalerror

w8biq8rn  于 2021-08-20  发布在  Java
关注(0)|答案(1)|浏览(338)
Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/admin/products/product/add/

Django Version: 2.0.7
Python Version: 3.8.6
Installed Applications:
    ['django.contrib.admin',
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'products',]
Installed Middleware:
    ['django.middleware.security.SecurityMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.clickjacking.XFrameOptionsMiddleware']
Exception Type: OperationalError at /admin/products/product/add/
Exception Value: no such table: main.auth_user__old

当我点击save按钮时,django管理站点出现了这个错误。以下是错误:
Exception Type: OperationalError at /admin/products/product/add/ Exception Value: no such table: main.auth_user__old

nmpmafwu

nmpmafwu1#

缺少迁移,
只需执行以下操作:
django manage.py makemigrations
django manage.py迁移

相关问题