[Solved]-Table 'MyDjango.django_admin_log' doesn't exist


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.


try running python manage.py syncdb



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

Leave a comment