python manage.py inspectdb --database default goods main_menu sub_menu > apps/goods/models.py
不报错
python manage.py inspectdb --database default goods main_menu sub_menu > apps/user/models.py
报错
apps/user路径存在,不存在空字符串
报错为:
Traceback (most recent call last):
File “C:\Users\Star\Desktop\Python\muxi\manage.py”, line 22, in
main()
File “C:\Users\Star\Desktop\Python\muxi\manage.py”, line 18, in main
execute_from_command_line(sys.argv)
File “C:\Users\Star\Desktop\Python\muxi.venv\Lib\site-packages\django\core\management_init_.py”, line 442, in execute_from_command_line
utility.execute()
File “C:\Users\Star\Desktop\Python\muxi.venv\Lib\site-packages\django\core\management_init_.py”, line 416, in execute
django.setup()
File “C:\Users\Star\Desktop\Python\muxi.venv\Lib\site-packages\django_init_.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “C:\Users\Star\Desktop\Python\muxi.venv\Lib\site-packages\django\apps\registry.py”, line 116, in populate
app_config.import_models()
File “C:\Users\Star\Desktop\Python\muxi.venv\Lib\site-packages\django\apps\config.py”, line 269, in import_models
self.models_module = import_module(models_module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Python312\Lib\importlib_init_.py”, line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “