为了账号安全,请及时绑定邮箱和手机立即绑定

初学者请教:改成include()出错

F:\django\myblog>python manage.py runserver

Performing system checks...


Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x00000202B0F10F28>

Traceback (most recent call last):

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 535, in url_patterns

    iter(patterns)

TypeError: 'module' object is not iterable


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper

    fn(*args, **kwargs)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run

    self.check(display_num_errors=True)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 379, in check

    include_deployment_checks=include_deployment_checks,

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 366, in _run_checks

    return checks.run_checks(**kwargs)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\registry.py", line 71, in run_checks

    new_errors = check(app_configs=app_configs)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config

    return check_resolver(resolver)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver

    return check_method()

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 397, in check

    warnings.extend(check_resolver(pattern))

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver

    return check_method()

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 396, in check

    for pattern in self.url_patterns:

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\functional.py", line 37, in __get__

    res = instance.__dict__[self.name] = self.func(instance)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 542, in url_patterns

    raise ImproperlyConfigured(msg.format(name=self.urlconf_name))

django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'blog.urls' from 'F:\\django\\myblog\\blog\\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.

Performing system checks...


Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x000002CFDDC50F28>

Traceback (most recent call last):

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 535, in url_patterns

    iter(patterns)

TypeError: 'module' object is not iterable


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper

    fn(*args, **kwargs)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run

    self.check(display_num_errors=True)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 379, in check

    include_deployment_checks=include_deployment_checks,

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 366, in _run_checks

    return checks.run_checks(**kwargs)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\registry.py", line 71, in run_checks

    new_errors = check(app_configs=app_configs)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config

    return check_resolver(resolver)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver

    return check_method()

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 397, in check

    warnings.extend(check_resolver(pattern))

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver

    return check_method()

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 396, in check

    for pattern in self.url_patterns:

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\functional.py", line 37, in __get__

    res = instance.__dict__[self.name] = self.func(instance)

  File "E:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py", line 542, in url_patterns

    raise ImproperlyConfigured(msg.format(name=self.urlconf_name))

django.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'blog.urls' from 'F:\\django\\myblog\\blog\\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 回答

单词 或 格式 不正确

0 回复 有任何疑惑可以回复我~

你好,你解决了吗?


0 回复 有任何疑惑可以回复我~

请问解决了吗

0 回复 有任何疑惑可以回复我~

很有可能是某个单词打错了

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
django入门与实践
  • 参与学习       65159    人
  • 解答问题       869    个

手把手带你进入Django开发的大门,充分领略Django的魅力

进入课程

初学者请教:改成include()出错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信