H
H
howuu2019-07-11 11:09:55
Django
howuu, 2019-07-11 11:09:55

Django.db.utils.OperationalError: no such table?

I connect several old applications to a new Django project, during migration it gives such an error
In views, I often see things like this

oregon = State.objects.get_or_create(value = "Oregon")[:0]

Can't do makemigrations, I've tried doing --fake migrations, doing --runsyncdb and all similar questions from stackoverflow already tried, I'm using sqlite now, I've tried deleting existing migrations or deleting the entire database and doing them again, I guess that the conflict is that I immediately make queries to the database in the views, but is there an alternative solution than to comment out all such participants in the views, make a migration and move on?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question