Django首次应用

Django首次应用,django,python-2.7,django-templates,Django,Python 2.7,Django Templates,启动python manage.py后,运行服务器抛出这样一个错误,在创建目录之前,服务器页面正确启动 M:\Project\u Django\mysite>python manage.py运行服务器 正在执行系统检查 Unhandled exception in thread started by <function wrapper at 0x043E18F0> Traceback (most recent call last): File "C:\Python27\

启动python manage.py后,运行服务器抛出这样一个错误,在创建目录之前,服务器页面正确启动

M:\Project\u Django\mysite>python manage.py运行服务器 正在执行系统检查

Unhandled exception in thread started by <function wrapper at 0x043E18F0>
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\django\utils\autoreload.py", line 228, in wrapper
    fn(*args, **kwargs)
  File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.py", line 124, in inner_run
    self.check(display_num_errors=True)
  File "C:\Python27\lib\site-packages\django\core\management\base.py", line 359, in check
    include_deployment_checks=include_deployment_checks,
  File "C:\Python27\lib\site-packages\django\core\management\base.py", line 346, 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 16, in check_url_config
    return check_resolver(resolver)
  File "C:\Python27\lib\site-packages\django\core\checks\urls.py", line 26, in check_resolver
    return check_method()
  File "C:\Python27\lib\site-packages\django\urls\resolvers.py", line 256, in check
    for pattern in self.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 407, in url_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 400, in urlconf_module
    return import_module(self.urlconf_name)
  File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
  File "M:\Project_Django\mysite\mysite\urls.py", line 17, in <module>
    from django.urls import path, include,strona
ImportError: cannot import name path
由启动的线程中未处理的异常 回溯(最近一次呼叫最后一次): 包装器中的文件“C:\Python27\lib\site packages\django\utils\autoreload.py”,第228行 fn(*args,**kwargs) 文件“C:\Python27\lib\site packages\django\core\management\commands\runserver.py”,第124行,在内部运行 self.check(display\u num\u errors=True) 检查文件“C:\Python27\lib\site packages\django\core\management\base.py”,第359行 包括部署检查=包括部署检查, 文件“C:\Python27\lib\site packages\django\core\management\base.py”,第346行,在运行检查中 返回检查。运行检查(**kwargs) 文件“C:\Python27\lib\site packages\django\core\checks\registry.py”,第81行,在运行检查中 新建错误=检查(应用程序配置=应用程序配置) 文件“C:\Python27\lib\site packages\django\core\checks\url.py”,第16行,在check\u url\u config中 返回检查\u分解器(分解器) 文件“C:\Python27\lib\site packages\django\core\checks\url.py”,第26行,在check\u解析器中 返回检查方法() 检查文件“C:\Python27\lib\site packages\django\url\resolvers.py”第256行 对于self.url_模式中的模式: 文件“C:\Python27\lib\site packages\django\utils\functional.py”,第35行,在__ res=instance.\uuuu dict\uuuu[self.name]=self.func(实例) 文件“C:\Python27\lib\site packages\django\url\resolvers.py”,第407行,url\u模式 patterns=getattr(self.urlconf_模块,“urlpatterns”,self.urlconf_模块) 文件“C:\Python27\lib\site packages\django\utils\functional.py”,第35行,在__ res=instance.\uuuu dict\uuuu[self.name]=self.func(实例) urlconf_模块中的文件“C:\Python27\lib\site packages\django\url\resolvers.py”,第400行 返回导入_模块(self.urlconf_名称) 文件“C:\Python27\lib\importlib\\uuuu init\uuuuu.py”,第37行,在导入模块中 __导入(名称) 文件“M:\Project\u Django\mysite\mysite\url.py”,第17行,在 从django.url导入路径,包括,strona ImportError:无法导入名称路径
支持python 2.7的上一个版本是django 1.11,它没有新的路径语法,请查看适当的文档。也可以考虑更新Django版本,如果你刚刚开始使用Python 3。*代替