Django project running service reported an error NameError: name ‘OS’ is not defined

Existing problems:
after Django creates a new project, when running the service command “Python manage. Py runserver”, an error is reported: NameError: name ‘OS’ is not defined


Solution:
find the setting.py file in the new project path and add “import OS” to it

Note: the method to judge whether the project is successfully created is if something similar to“ http://127.0.0.1:8000/ ”The project address, and “the install worked successfully! Integrations!” is displayed in the browser.

Read More: