{"id":6019,"date":"2020-09-19T04:44:21","date_gmt":"2020-09-18T19:44:21","guid":{"rendered":"http:\/\/blog.jansnap.com\/?p=6019"},"modified":"2021-12-19T20:36:07","modified_gmt":"2021-12-19T11:36:07","slug":"django%e3%81%a7runserver%e3%81%a7%e9%96%8b%e7%99%ba%e7%94%a8%e3%82%b5%e3%83%bc%e3%83%90%e3%82%92%e8%b5%b7%e5%8b%95%e3%81%97%e3%82%88%e3%81%86%e3%81%a8%e3%81%97%e3%81%9f%e3%82%89%e3%80%81%e3%80%8craise","status":"publish","type":"post","link":"https:\/\/blog.jansnap.com\/?p=6019","title":{"rendered":"django\u3067runserver\u3067\u958b\u767a\u7528\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u3001\u300craise ImproperlyConfigured\u300d\u304c\u51fa\u3066\u8d77\u52d5\u3057\u306a\u3044\u5834\u5408\u306e\u78ba\u8a8d\u3068\u5bfe\u5fdc"},"content":{"rendered":"\n<h2><span class=\"ez-toc-section\" id=\"%E7%8A%B6%E6%B3%81\"><\/span>\n\u72b6\u6cc1<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<ul>\n<li>\n<code>python3 manage.py runserver<\/code>\u306a\u3069\u3067\u958b\u767a\u7528\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u8d77\u52d5\u3057\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"text\" class=\"language-text\">Exception in thread django-main-thread:\nTraceback (most recent call last):\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/urls\/resolvers.py\", line 591, in url_patterns\n    iter(patterns)\nTypeError: 'module' object is not iterable\n\n(\u7565)\n\n    raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e\ndjango.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'sampleapp.urls'=\"\" from=\"\" '=\"\" src=\"\" authtest=\"\" authtestprj=\"\" sampleapp=\"\" 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.<\/module><\/code><\/pre>\n\n\n\n<h2><span class=\"ez-toc-section\" id=\"%E7%A2%BA%E8%AA%8D%E3%83%9D%E3%82%A4%E3%83%B3%E3%83%88\"><\/span>\n\u78ba\u8a8d\u30dd\u30a4\u30f3\u30c8<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<ul>\n<li>\n<code>\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u540d<\/code>\u3068<code>does not appear to have any patterns in it.<\/code>\u3068\u304c\u51fa\u3066\u3044\u308b\u306e\u3067\u3001\u8a72\u5f53\u30bd\u30fc\u30b9\u3092\u898b\u308b<\/li>\n<\/ul>\n\n<h2><span class=\"ez-toc-section\" id=\"%E5%8E%9F%E5%9B%A0\"><\/span>\n\u539f\u56e0<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<ul>\n<li>\u300curlpatterns\u300d\u3092\u300curlpetterns\u300d\u3068\u6253\u3061\u9593\u9055\u3048\u3066\u3044\u305f<\/li>\n<\/ul>\n\n<h2><span class=\"ez-toc-section\" id=\"%E5%AF%BE%E5%BF%9C\"><\/span>\n\u5bfe\u5fdc<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<ul>\n<li>\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u51fa\u3066\u3044\u305f\u8a72\u5f53\u30d5\u30a1\u30a4\u30eb\u306e\u30bf\u30a4\u30d7\u30df\u30b9\u3092\u4fee\u6b63<\/li>\n<\/ul>\n\n<h2><span class=\"ez-toc-section\" id=\"%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8%E3%81%AE%E5%85%A8%E4%BD%93\"><\/span>\n\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u5168\u4f53<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ python3 manage.py runserver 0.0.0.0:8000\nWatching for file changes with StatReloader\nPerforming system checks...\n\nException in thread django-main-thread:\nTraceback (most recent call last):\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/urls\/resolvers.py\", line 591, in url_patterns\n    iter(patterns)\nTypeError: 'module' object is not iterable\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"\/usr\/lib\/python3.6\/threading.py\", line 916, in _bootstrap_inner\n    self.run()\n  File \"\/usr\/lib\/python3.6\/threading.py\", line 864, in run\n    self._target(*self._args, **self._kwargs)\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/utils\/autoreload.py\", line 53, in wrapper\n    fn(*args, **kwargs)\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/core\/management\/commands\/runserver.py\", line 118, in inner_run\n    self.check(display_num_errors=True)\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/core\/management\/base.py\", line 396, in check\n    databases=databases,\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/core\/checks\/registry.py\", line 70, in run_checks\n    new_errors = check(app_configs=app_configs, databases=databases)\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/core\/checks\/urls.py\", line 13, in check_url_config\n    return check_resolver(resolver)\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/core\/checks\/urls.py\", line 23, in check_resolver\n    return check_method()\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/urls\/resolvers.py\", line 409, in check\n    messages.extend(check_resolver(pattern))\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/core\/checks\/urls.py\", line 23, in check_resolver\n    return check_method()\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/urls\/resolvers.py\", line 408, in check\n    for pattern in self.url_patterns:\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/utils\/functional.py\", line 48, in __get__\n    res = instance.__dict__[self.name] = self.func(instance)\n  File \"\/usr\/local\/lib\/python3.6\/dist-packages\/django\/urls\/resolvers.py\", line 598, in url_patterns\n    raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e\ndjango.core.exceptions.ImproperlyConfigured: The included URLconf '<module 'sampleapp.urls'=\"\" from=\"\" '=\"\" src=\"\" authtest=\"\" authtestprj=\"\" sampleapp=\"\" 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.<\/module><\/code><\/pre>\n\n\n","protected":false},"excerpt":{"rendered":"<ul>\n<li><code>python3 manage.py runserver<\/code>\u306a\u3069\u3067\u958b\u767a\u7528\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u8d77\u52d5\u3057\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/li>\n<\/ul>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4106,4070,4071,4130],"tags":[4103,4066,4129],"class_list":["post-6019","post","type-post","status-publish","format-standard","hentry","category-django","category-python","category-python3","category-runserver","tag-django","tag-python3","tag-runserver"],"_links":{"self":[{"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/posts\/6019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6019"}],"version-history":[{"count":1,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/posts\/6019\/revisions"}],"predecessor-version":[{"id":6374,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=\/wp\/v2\/posts\/6019\/revisions\/6374"}],"wp:attachment":[{"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jansnap.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}