Коды Django для решения распространенных проблем
Есть ли общие проблемы и решения, которые кто-нибудь хотел бы выложить здесь? Ниже приведены некоторые решения распространенных ошибок/проблем, с которыми я столкнулся в прошлом. Спасибо
Q1: "if error, no such table"
Ans: try run :" python manage.py migrate --run-syncdb "
this command will look into which tables were not created and will create all the needed tables
Q2: "if encounter....".... migration admin.0001_initial is applied before its dependency ...._initial on database 'default '. "
Ans: just delete the 001 initial .py from migration folder and delete db.sqlite3
then run migration , migrate