首页新闻找找看学习计划

python跑项目报错,不知道怎么处理,希望大神指教?

0
[待解决问题]

D:\Madking1\venv\Scripts\python.exe D:/Madking1/Madking1/manage.py runserver 0.0.0.0:8000
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
July 18, 2019 - 11:08:37
Django version 2.2.3, using settings None
Starting development server at http://0.0.0.0:8000/
Quit the server with CTRL-BREAK.
Traceback (most recent call last):
File "C:\Users\zhou1\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\wsgi.py", line 141, in call
response = self.get_response(request)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\base.py", line 74, in get_response
set_urlconf(settings.ROOT_URLCONF)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 80, in getattr
val = getattr(self._wrapped, name)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 222, in getattr
return getattr(self.default_settings, name)
AttributeError: module 'django.conf.global_settings' has no attribute 'ROOT_URLCONF'
[18/Jul/2019 11:08:45] "GET / HTTP/1.1" 500 59
Traceback (most recent call last):
File "C:\Users\zhou1\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\wsgi.py", line 141, in call
response = self.get_response(request)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\base.py", line 74, in get_response
set_urlconf(settings.ROOT_URLCONF)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 80, in getattr
val = getattr(self._wrapped, name)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 222, in getattr
return getattr(self.default_settings, name)
AttributeError: module 'django.conf.global_settings' has no attribute 'ROOT_URLCONF'
[18/Jul/2019 11:08:50] "GET /admin/ HTTP/1.1" 500 59
Traceback (most recent call last):
File "C:\Users\zhou1\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\wsgi.py", line 141, in call
response = self.get_response(request)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\base.py", line 74, in get_response
set_urlconf(settings.ROOT_URLCONF)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 80, in getattr
val = getattr(self._wrapped, name)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 222, in getattr
return getattr(self.default_settings, name)
AttributeError: module 'django.conf.global_settings' has no attribute 'ROOT_URLCONF'
[18/Jul/2019 11:08:52] "GET /admin/ HTTP/1.1" 500 59
Traceback (most recent call last):
File "C:\Users\zhou1\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\wsgi.py", line 141, in call
response = self.get_response(request)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\base.py", line 74, in get_response
set_urlconf(settings.ROOT_URLCONF)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 80, in getattr
val = getattr(self._wrapped, name)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 222, in getattr
return getattr(self.default_settings, name)
AttributeError: module 'django.conf.global_settings' has no attribute 'ROOT_URLCONF'
[18/Jul/2019 11:08:52] "GET /admin/ HTTP/1.1" 500 59
Traceback (most recent call last):
File "C:\Users\zhou1\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\wsgi.py", line 141, in call
response = self.get_response(request)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\base.py", line 74, in get_response
set_urlconf(settings.ROOT_URLCONF)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 80, in getattr
val = getattr(self._wrapped, name)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 222, in getattr
return getattr(self.default_settings, name)
AttributeError: module 'django.conf.global_settings' has no attribute 'ROOT_URLCONF'
[18/Jul/2019 11:08:52] "GET /admin/ HTTP/1.1" 500 59
Traceback (most recent call last):
File "C:\Users\zhou1\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\wsgi.py", line 141, in call
response = self.get_response(request)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\base.py", line 74, in get_response
set_urlconf(settings.ROOT_URLCONF)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 80, in getattr
val = getattr(self._wrapped, name)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 222, in getattr
return getattr(self.default_settings, name)
AttributeError: module 'django.conf.global_settings' has no attribute 'ROOT_URLCONF'
[18/Jul/2019 11:09:26] "GET /admin/ HTTP/1.1" 500 59
Traceback (most recent call last):
File "C:\Users\zhou1\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\wsgi.py", line 141, in call
response = self.get_response(request)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\base.py", line 74, in get_response
set_urlconf(settings.ROOT_URLCONF)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 80, in getattr
val = getattr(self._wrapped, name)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 222, in getattr
return getattr(self.default_settings, name)
AttributeError: module 'django.conf.global_settings' has no attribute 'ROOT_URLCONF'
[18/Jul/2019 11:09:26] "GET /admin/ HTTP/1.1" 500 59
Traceback (most recent call last):
File "C:\Users\zhou1\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\wsgi.py", line 141, in call
response = self.get_response(request)
File "D:\Madking1\venv\lib\site-packages\django\core\handlers\base.py", line 74, in get_response
set_urlconf(settings.ROOT_URLCONF)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 80, in getattr
val = getattr(self._wrapped, name)
File "D:\Madking1\venv\lib\site-packages\django\conf__init__.py", line 222, in getattr
return getattr(self.default_settings, name)
AttributeError: module 'django.conf.global_settings' has no attribute 'ROOT_URLCONF'
[18/Jul/2019 11:09:27] "GET /admin/ HTTP/1.1" 500 59

zhouhaiwu的主页 zhouhaiwu | 初学一级 | 园豆:196
提问于:2019-07-18 11:11
< >
分享
所有回答(1)
0

'APP_DIRS': True,
在settings中设置
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'blog.views.global_settings'
],
},

微安微安 | 园豆:209 (菜鸟二级) | 2019-07-19 13:45
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册