小编Tha*_*YOU的帖子

迁移时Django FieldDoesNotExist异常

使用django 1.9.所以我试图迁移我的数据库但是我遇到了这个错误.我花了很多时间来解决这个问题并且没有成功.如果有必要,我可以上传更多代码.这是错误:

C:\Users\James\Desktop\James\Work\django\homepgcom>python manage.py migrate
Operations to perform:
  Apply all migrations: auth, interface, sessions, admin, contenttypes, userprofile
Running migrations:
  Rendering model states... DONE
  Applying interface.0002_auto_20160107_1635...Traceback (most recent call last):  
File "C:\Users\James\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\models\options.py", line 580, in get_field
return self.fields_map[field_name]
KeyError: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\James\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management\__init__.py", line 350, in execute_from_command_line
utility.execute()
File "C:\Users\James\AppData\Local\Programs\Python\Python35\lib\site-packages\
django\core\management\__init__.py", line 342, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\James\AppData\Local\Programs\Python\Python35\lib\site-packages\
django\core\management\base.py", line 348, …
Run Code Online (Sandbox Code Playgroud)

python migration sqlite django

8
推荐指数
1
解决办法
3977
查看次数

标签 统计

django ×1

migration ×1

python ×1

sqlite ×1