When I try to install a database into my local I used;
python manage.py syncdb --noinput
However, it gave;
Table 'lodging_zh.django_site' doesn't exist"
It gave the error at Site.objects.get_current() line. Probably it tries to reach the currenct_site on the database. However since database is empty, it gave an error. Do you have any idea about this problem to solve?
Probably something with migration order. You can try to remove django.contrib.sites from the INSTALLED_APPS and then syncdb. If that succeeds add django.contrib.sites and migrate again.
Alternatively you can add 'sites': 'my_app.sites_migrations to MIGRATION_MODULES and then make migrations for this with python manage.py makemigrations sites. Then running syncdb might work as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With