Traceback (most recent call last):
File "C:\Users\***\PycharmProjects\myshop\myshop\manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "E:\code\python 3.12\Lib\site-packages\django\core\management\__init__.py", line 442, in execute_from_command_line
utility.execute()
File "E:\code\python 3.12\Lib\site-packages\django\core\management\__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "E:\code\python 3.12\Lib\site-packages\django\core\management\base.py", line 413, in run_from_argv
self.execute(*args, **cmd_options)
File "E:\code\python 3.12\Lib\site-packages\django\core\management\base.py", line 459, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\code\python 3.12\Lib\site-packages\django\core\management\base.py", line 107, in wrapper
res = handle_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\code\python 3.12\Lib\site-packages\django\core\management\commands\migrate.py", line 357, in handle
post_migrate_state = executor.migrate(
^^^^^^^^^^^^^^^^^
File "E:\code\python 3.12\Lib\site-packages\django\db\migrations\executor.py", line 135, in migrate
state = self._migrate_all_forwards(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\code\python 3.12\Lib\site-packages\django\db\migrations\executor.py", line 167, in _migrate_all_forwards
state = self.apply_migration(
^^^^^^^^^^^^^^^^^^^^^
File "E:\code\python 3.12\Lib\site-packages\django\db\migrations\executor.py", line 255, in apply_migration
state = migration.apply(state, schema_editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\code\python 3.12\Lib\site-packages\django\db\migrations\migration.py", line 118, in apply
operation.state_forwards(self.app_label, project_state)
File "E:\code\python 3.12\Lib\site-packages\django\db\migrations\operations\models.py", line 662, in state_forwards
state.alter_model_options(
File "E:\code\python 3.12\Lib\site-packages\django\db\migrations\state.py", line 188, in alter_model_options
self.reload_model(app_label, model_name, delay=True)
File "E:\code\python 3.12\Lib\site-packages\django\db\migrations\state.py", line 399, in reload_model
self._reload(related_models)
File "E:\code\python 3.12\Lib\site-packages\django\db\migrations\state.py", line 434, in _reload
self.apps.render_multiple(states_to_be_rendered)
File "E:\code\python 3.12\Lib\site-packages\django\db\migrations\state.py", line 664, in render_multiple
model.render(self)
File "E:\code\python 3.12\Lib\site-packages\django\db\migrations\state.py", line 957, in render
return type(self.name, bases, body)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\code\python 3.12\Lib\site-packages\django\db\models\base.py", line 143, in __new__
new_class.add_to_class("_meta", Options(meta, app_label))
File "E:\code\python 3.12\Lib\site-packages\django\db\models\base.py", line 371, in add_to_class
value.contribute_to_class(cls, name)
File "E:\code\python 3.12\Lib\site-packages\django\db\models\options.py", line 220, in contribute_to_class
raise TypeError(
TypeError: 'class Meta' got invalid attribute(s): index_together
怎么办啊,这个问题如何解决?