MYSQl驱动安装完成 执行makemigrations出错,

来源:3-2 配置表单页面

_飛旋枫叶_0

2017-10-23

"C:\Program Files\JetBrains\PyCharm 2017.2.3\bin\runnerw.exe" C:\Users\Administrator\Envs\testvir2\Scripts\python.exe "C:\Program Files\JetBrains\PyCharm 2017.2.3\helpers\pycharm\django_manage.py" makemigrations C:/Users/Administrator/PycharmProjects/djangostart

Traceback (most recent call last):

  File "C:\Program Files\JetBrains\PyCharm 2017.2.3\helpers\pycharm\django_manage.py", line 43, in <module>

    run_module(manage_file, None, '__main__', True)

  File "c:\python27\Lib\runpy.py", line 188, in run_module

    fname, loader, pkg_name)

  File "c:\python27\Lib\runpy.py", line 82, in _run_module_code

    mod_name, mod_fname, mod_loader, pkg_name)

  File "c:\python27\Lib\runpy.py", line 72, in _run_code

    exec code in run_globals

  File "C:\Users\Administrator\PycharmProjects\djangostart\manage.py", line 24, in <module>

    execute_from_command_line(sys.argv)

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\core\management\__init__.py", line 364, in execute_from_command_line

    utility.execute()

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\core\management\__init__.py", line 356, in execute

    self.fetch_command(subcommand).run_from_argv(self.argv)

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\core\management\base.py", line 283, in run_from_argv

    self.execute(*args, **cmd_options)

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\core\management\base.py", line 327, in execute

    self.check()

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\core\management\base.py", line 359, in check

    include_deployment_checks=include_deployment_checks,

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\core\management\base.py", line 346, in _run_checks

    return checks.run_checks(**kwargs)

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\core\checks\registry.py", line 81, in run_checks

    new_errors = check(app_configs=app_configs)

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\core\checks\urls.py", line 16, in check_url_config

    return check_resolver(resolver)

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\core\checks\urls.py", line 26, in check_resolver

    return check_method()

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\urls\resolvers.py", line 254, in check

    for pattern in self.url_patterns:

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\utils\functional.py", line 35, in __get__

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

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\urls\resolvers.py", line 405, in url_patterns

    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\utils\functional.py", line 35, in __get__

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

  File "C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\urls\resolvers.py", line 398, in urlconf_module

    return import_module(self.urlconf_name)

  File "c:\python27\Lib\importlib\__init__.py", line 37, in import_module

    __import__(name)

  File "C:/Users/Administrator/PycharmProjects/djangostart\djangostart\urls.py", line 18, in <module>

    from message.views import getform

ImportError: No module named message.views


写回答

2回答

bobby

2017-10-24

你截图我看看你的代码结构

0
0

其实我是夏

2017-10-23

这个是ImportError,要先注意看下你pycharm里面这句

    from message.views import getform

代码本身有没有报错

0
0

Python3.6+django+xadmin,打造在线教育平台

【毕设】Python 2.7到3.6 完美适配,Django升级2.0

3677 学习 · 4038 问题

查看课程