私はDjango Webサイトを開始するために、Visual Studio 2013とPython Tools for VS 2013を使用しています。名前パターンをインポートできません - django
それは
完全トレースバック
Performing system checks...
Traceback (most recent call last):
File "c:\users\my_username\documents\visual studio 2013\Projects\DjangoWebProject
1\DjangoWebProject1\manage.py", line 17, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
367, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 294,
in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.
py", line 58, in execute
super(Command, self).execute(*args, **options)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 345,
in execute
output = self.handle(*args, **options)
File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.
py", line 97, in handle
self.run(**options)
File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.
py", line 108, in run
self.inner_run(None, **options)
File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.
py", line 121, in inner_run
self.check(display_num_errors=True)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 374,
in check
include_deployment_checks=include_deployment_checks,
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 361,
in _run_checks
return checks.run_checks(**kwargs)
File "C:\Python27\lib\site-packages\django\core\checks\registry.py", line 81,
in run_checks
new_errors = check(app_configs=app_configs)
File "C:\Python27\lib\site-packages\django\core\checks\urls.py", line 14, in c
heck_url_config
return check_resolver(resolver)
File "C:\Python27\lib\site-packages\django\core\checks\urls.py", line 24, in c
heck_resolver
for pattern in resolver.url_patterns:
File "C:\Python27\lib\site-packages\django\utils\functional.py", line 35, in _
_get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Python27\lib\site-packages\django\urls\resolvers.py", line 313, in ur
l_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Python27\lib\site-packages\django\utils\functional.py", line 35, in _
_get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Python27\lib\site-packages\django\urls\resolvers.py", line 306, in ur
lconf_module
return import_module(self.urlconf_name)
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "c:\users\my_username\documents\visual studio 2013\Projects\DjangoWebProject
1\DjangoWebProject1\DjangoWebProject1\urls.py", line 6, in <module>
from django.conf.urls import patterns, url
ImportError: cannot import name patterns
Press any key to continue . . .
私はこれをどのように修正することができ、次のエラーを与えますか?
まず、デバッグモードではなく、これを実行し、質問に完全なトレースバックを添付してください。 – Udi