前提・実現したいこと
リンクを参照しながらコーディングしています
ページの通りにしているのですが次のコマンドが通りません
発生している問題・エラーメッセージ
サイト
入力 >python manage.py makemigrations 出力 No changes detected
実際
入力 >python manage.py makemigrations 出力 Traceback (most recent call last): File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\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 "manage.py", line 15, in <module> execute_from_command_line(sys.argv) File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py", line 381, in execute_from_command_line utility.execute() File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 316, in run_from_argv self.execute(*args, **cmd_options) File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 350, in execute self.check() File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 379, in check include_deployment_checks=include_deployment_checks, File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py", line 366, in _run_checks return checks.run_checks(**kwargs) File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\registry.py", line 71, in run_checks new_errors = check(app_configs=app_configs) File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config return check_resolver(resolver) File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver return check_method() File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\urls\resolvers.py", line 397, in check warnings.extend(check_resolver(pattern)) File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver return check_method() File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\urls\resolvers.py", line 396, in check for pattern in self.url_patterns: File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\lib\site-packages\django\utils\functional.py", line 37, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "C:\Users(UserName)\AppData\Local\Programs\Python\Python37\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 'accounts.urls' from 'c:\practice\myproject\accounts\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.
該当のソースコード
urls.py
Python
1from django.contrib import admin 2from django.urls import path,include 3 4urlpatterns = [ 5 path('admin/', admin.site.urls), 6 path('accounts/',include('accounts.urls')), 7]
補足情報(FW/ツールのバージョンなど)
Python 3.7.4
Django 2.1
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/09/12 06:46
2019/09/12 07:11