Django 1.5.4: no such table: django_site in admin/

2020-07-27 09:31发布

问题:

pip installed south, and added south to INSTALLED_APPS in settings.py and ran python manage.py migrate, but when I navigate to localhost:8000/admin, it says

no such table: django_site

Did my migration not run successfully? When I enter the command python manage.py migrate it no longer throws any error like before when I didn't have South installed, it just returns.

I am using windows 7 and Pycharms.

回答1:

You might need to run syncdb before the first migrate:

python manage.py syncdb
python manage.py migrate

The django_site should already exist and it's created when you run syncdb