
用django时候映射完URL在打开http://localhost:8000/报这个错误,请问什么原因啊 新手求帮助啊
Unhandledexceptioninthreadstartedby<functionwrapperat0x7f3288a1be60>Traceback(mostrec...
Unhandled exception in thread started by <function wrapper at 0x7f3288a1be60>
Traceback (most recent call last):
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 227, in wrapper
fn(*args, **kwargs)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 125, in inner_run
self.check(display_num_errors=True)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/management/base.py", line 359, in check
include_deployment_checks=include_deployment_checks,
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/management/base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 16, in check_url_config
return check_resolver(resolver)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 255, in check
warnings.extend(check_resolver(pattern))
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 254, in check
for pattern in self.url_patterns:
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 414, in url_patterns
raise ImproperlyConfigured(msg.format(name=self.urlconf_name))
django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'learning_logs.urls' from '/home/chenjunbiao/learning_log/learning_logs/urls.py'>' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import. 展开
Traceback (most recent call last):
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 227, in wrapper
fn(*args, **kwargs)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 125, in inner_run
self.check(display_num_errors=True)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/management/base.py", line 359, in check
include_deployment_checks=include_deployment_checks,
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/management/base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 16, in check_url_config
return check_resolver(resolver)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 255, in check
warnings.extend(check_resolver(pattern))
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 254, in check
for pattern in self.url_patterns:
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/chenjunbiao/learning_log/ll_env/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 414, in url_patterns
raise ImproperlyConfigured(msg.format(name=self.urlconf_name))
django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'learning_logs.urls' from '/home/chenjunbiao/learning_log/learning_logs/urls.py'>' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import. 展开
4个回答
展开全部
看最后的提示:很有可能是循环引用,urls配置错误
检查一下看看是不是两个文件相互import
再看看urls里面的路径是否写的正确
检查一下看看是不是两个文件相互import
再看看urls里面的路径是否写的正确
展开全部
我的也出现了错误,把urlpatterns错写成了urlpartterns
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
解决了吗,我也碰到这个问题( ▼-▼ )
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
可能是css没配置对。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询