I think I’m well off the beaten path here. For one, I built the project using this because I was flummoxed by the tutorial. With that structure I was able to make some progress.
My second step off the path was that I was using (.venv) PS G:\workspace\python-land\diet> python to launch the shell. Looking back at the tutorial, I see instead (.venv) PS G:\workspace\python-land\diet> python manage.py shell. When I tried that just now I get:
Traceback (most recent call last):
File "G:\workspace\python-land\diet\manage.py", line 22, in <module>
main()
File "G:\workspace\python-land\diet\manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\core\management\__init__.py", line 446, in execute_from_command_line
utility.execute()
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\core\management\__init__.py", line 386, in execute
settings.INSTALLED_APPS
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\conf\__init__.py", line 92, in __getattr__
self._setup(name)
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\conf\__init__.py", line 79, in _setup
self._wrapped = Settings(settings_module)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\workspace\python-land\diet\.venv\Lib\site-packages\django\conf\__init__.py", line 190, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 121, in import_module
raise TypeError(msg.format(name))
TypeError: the 'package' argument is required to perform a relative import for '.diet_project.settings'
Looks like my spaghetti route ends up in the same place.