django.core.exceptions.ValidationError ["'暂停'值必须为True或False。"]

时间:2017-09-10 10:04:53

标签: django

我一直在探索Django框架及其真棒,但我一直遇到错误,但设法在互联网上获得解决方案,主要是堆栈溢出

然而,我得到了一个错误,我无法自行修复它。我需要一些帮助

我运行

时出现上述错误
python manage.py migrate

否则,系统工作正常,没有错误。我不知道

是什么错误

这是错误

 Operations to perform:

 Apply all migrations: admin, auth, contenttypes, files, report_builder, 
 sessions
Running migrations:
Applying files.0029_students_status...Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)

File "C:\Python34\lib\site-packages\django\core\management\__init__.py", 
line 363, in execute_from_command_line
utility.execute()

File "C:\Python34\lib\site-packages\django\core\management\__init__.py", 
line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)

File "C:\Python34\lib\site-packages\django\core\management\base.py", line 
283, in run_from_argv
self.execute(*args, **cmd_options)

File "C:\Python34\lib\site-packages\django\core\management\base.py", line 
330, in execute
output = self.handle(*args, **options)

File "C:\Python34\lib\site-
packages\django\core\management\commands\migrate.py", line 204, in handle
fake_initial=fake_initial,

File "C:\Python34\lib\site-packages\django\db\migrations\executor.py", line 
115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, 
fake_initial=fake_initial)

File "C:\Python34\lib\site-packages\django\db\migrations\executor.py", line 
145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, 
fake_initial=fake_initial)

File "C:\Python34\lib\site-packages\django\db\migrations\executor.py", line 
244, in apply_migration
state = migration.apply(state, schema_editor)

File "C:\Python34\lib\site-packages\django\db\migrations\migration.py", line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)

File "C:\Python34\lib\site-packages\django\db\migrations\operations\fields.py", line 87, in database_forwards
field,
File "C:\Python34\lib\site-packages\django\db\backends\sqlite3\schema.py", line 238, in add_field
self._remake_table(model, create_field=field)

File "C:\Python34\lib\site-packages\django\db\backends\sqlite3\schema.py", line 113, in _remake_table
self.effective_default(create_field)

File "C:\Python34\lib\site-packages\django\db\backends\base\schema.py", line 229, in effective_default
default = field.get_db_prep_save(default, self.connection)

File "C:\Python34\lib\site-packages\django\db\models\fields\__init__.py", line 770, in get_db_prep_save
prepared=False)

File "C:\Python34\lib\site-packages\django\db\models\fields\__init__.py", line 762, in get_db_prep_value
value = self.get_prep_value(value)

File "C:\Python34\lib\site-packages\django\db\models\fields\__init__.py", line 1043, in get_prep_value
return self.to_python(value)

File "C:\Python34\lib\site-packages\django\db\models\fields\__init__.py", line 1036, in to_python
params={'value': value},

我不知道这个暂停的来源。并且我的模型中没有名称为suspend

的字段
django.core.exceptions.ValidationError: ["'suspend' value must be either True or False."]

0 个答案:

没有答案