所以,昨天当我编码时一切都很好但现在每当我运行命令时 -python manage.py runserver出现此错误 -Traceback (most recent call last):File "C:\Users\LENOVO\anaconda3\lib\site-packages\django\core\management\base.py", line 328, in run_from_argv self.execute(*args, **cmd_options) File "C:\Users\LENOVO\anaconda3\lib\site-packages\django\core\management\commands\runserver.py", line 60, in execute super().execute(*args, **options) File "C:\Users\LENOVO\anaconda3\lib\site-packages\django\core\management\base.py", line 369, in execute output = self.handle(*args, **options) File "C:\Users\LENOVO\anaconda3\lib\site-packages\django\core\management\commands\runserver.py", line 67, in handle if not settings.DEBUG and not settings.ALLOWED_HOSTS: File "C:\Users\LENOVO\anaconda3\lib\site-packages\django\conf\__init__.py", line 76, in __getattr__ self._setup(name) File "C:\Users\LENOVO\anaconda3\lib\site-packages\django\conf\__init__.py", line 63, in _setup self._wrapped = Settings(settings_module) File "C:\Users\LENOVO\anaconda3\lib\site-packages\django\conf\__init__.py", line 142, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "C:\Users\LENOVO\anaconda3\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlockedModuleNotFoundError: No module named 'editdojo_project.settings'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "manage.py", line 21, in <module> main() File "manage.py", line 17, in main execute_from_command_line(sys.argv)我不知道这个错误是什么意思,另一个问题是我可以在不运行 runserverpython manage.py命令的情况下查看我的网站,这真的很奇怪,因为如果我们在不运行 runserverpython manage.py命令的情况下运行它,它通常会显示 404 页面未找到错误。
添加回答
举报
0/150
提交
取消