django遇到如下错误
Traceback(most recent call last):
File "",line 1,in
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/models/base.py",line 710,in save
force_update=force_update,update_fields=update_fields)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/models/base.py",line 738,in save_base
updated = self._save_table(raw,cls,force_insert,force_update,using,update_fields)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/models/base.py",line 822,in _save_table
result = self._do_insert(cls._base_manager,using,fields,update_pk,raw)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/models/base.py",line 861,in _do_insert
using=using,raw=raw)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/models/manager.py",line 127,in manager_method
return getattr(self.get_queryset(),name)(*args,**kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/models/query.py",line 920,in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/models/sql/compiler.py",line 974,in execute_sql
cursor.execute(sql,params)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/backends/utils.py",line 79,in execute
return super(CursorDebugWrapper,self).execute(sql,params)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/backends/utils.py",line 64,in execute
return self.cursor.execute(sql,params)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/utils.py",line 97,in __exit__
six.reraise(dj_exc_type,dj_exc_value,traceback)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/utils/six.py",line 658,in reraise
raise value.with_traceback(tb)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/backends/utils.py",line 64,in execute
return self.cursor.execute(sql,params)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py",line 318,in execute
return Database.Cursor.execute(self,query,params)
django.db.utils.OperationalError: no such table: boot_test_bookinfo
>>>
原因是代码没有migrate