Table 'MyDjango.django_admin_log' doesn't exist

后端 未结 3 1280
再見小時候
再見小時候 2021-02-20 07:04

I cannot create users and blogs in my django application.It simply shows an error(\"Table \'MyDjango.django_admin_log\' doesn\'t exist\") while press save button.The error messa

相关标签:
3条回答
  • 2021-02-20 07:48

    I solved this problem by makemigrations&migrate admin app.

    setp1: make sure 'django.contrib.admin' in INSTALLED_APPS list(in the File: project_dir/project_name/settings.py)

    setp2: run makemigrations&migrate:

    python manage.py makemigrations admin # maybe you need use root, start with sudo on ubuntu
    python manage.py migrate admin
    
    0 讨论(0)
  • 2021-02-20 07:49

    try running python manage.py syncdb

    0 讨论(0)
  • 2021-02-20 07:55

    Have you recently enabled admin history, but forgot to run syncdb? From what I see, Django had no problem locating your model tables, but when you tried to modify them through the admin interface it couldn't find the right table to store your actions.

    0 讨论(0)
提交回复
热议问题