Traceback (most recent call last):
File "F:\python3.5.1\python3\lib\site-packages\django\db\models\utils.py", line 14, in make_model_tuple
app_label, model_name = model.split(".")
ValueError: too many values to unpack (expected 2)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\pycharm\PyCharm 2017.1.4\helpers\pycharm\django_manage.py", line 43, in <module>
run_module(manage_file, None, '__main__', True)
File "f:\python3.5.1\Lib\runpy.py", line 182, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "f:\python3.5.1\Lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "f:\python3.5.1\Lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:/mxonline\manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "F:\python3.5.1\python3\lib\site-packages\django\core\management\__init__.py", line 363, in execute_from_command_line
utility.execute()
File "F:\python3.5.1\python3\lib\site-packages\django\core\management\__init__.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "F:\python3.5.1\python3\lib\site-packages\django\core\management\base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "F:\python3.5.1\python3\lib\site-packages\django\core\management\base.py", line 330, in execute
output = self.handle(*args, **options)
File "F:\python3.5.1\python3\lib\site-packages\django\core\management\commands\makemigrations.py", line 177, in handle
migration_name=self.migration_name,
File "F:\python3.5.1\python3\lib\site-packages\django\db\migrations\autodetector.py", line 47, in changes
changes = self._detect_changes(convert_apps, graph)
File "F:\python3.5.1\python3\lib\site-packages\django\db\migrations\autodetector.py", line 133, in _detect_changes
self.old_apps = self.from_state.concrete_apps
File "F:\python3.5.1\python3\lib\site-packages\django\db\migrations\state.py", line 222, in concrete_apps
self.apps = StateApps(self.real_apps, self.models, ignore_swappable=True)
File "F:\python3.5.1\python3\lib\site-packages\django\db\migrations\state.py", line 288, in __init__
self.render_multiple(list(models.values()) + self.real_models)
File "F:\python3.5.1\python3\lib\site-packages\django\db\migrations\state.py", line 323, in render_multiple
model.render(self)
File "F:\python3.5.1\python3\lib\site-packages\django\db\migrations\state.py", line 626, in render
body,
File "F:\python3.5.1\python3\lib\site-packages\django\db\models\base.py", line 162, in __new__
new_class.add_to_class(obj_name, obj)
File "F:\python3.5.1\python3\lib\site-packages\django\db\models\base.py", line 331, in add_to_class
value.contribute_to_class(cls, name)
File "F:\python3.5.1\python3\lib\site-packages\django\db\models\fields\related.py", line 745, in contribute_to_class
super(ForeignObject, self).contribute_to_class(cls, name, private_only=private_only, **kwargs)
File "F:\python3.5.1\python3\lib\site-packages\django\db\models\fields\related.py", line 348, in contribute_to_class
lazy_related_operation(resolve_related_class, cls, self.remote_field.model, field=self)
File "F:\python3.5.1\python3\lib\site-packages\django\db\models\fields\related.py", line 85, in lazy_related_operation
return apps.lazy_model_operation(partial(function, **kwargs), *model_keys)
File "F:\python3.5.1\python3\lib\site-packages\django\db\models\fields\related.py", line 83, in <genexpr>
model_keys = (make_model_tuple(m) for m in models)
File "F:\python3.5.1\python3\lib\site-packages\django\db\models\utils.py", line 23, in make_model_tuple
"must be of the form 'app_label.ModelName'." % model
ValueError: Invalid model reference 'apps.courses.Course'. String model references must be of the form 'app_label.ModelName'.
汪志艺
相关分类