Django / Python入门:执行python manage.py migration时出错。没有名为account的模块

时间:2018-08-26 05:21:42

标签: python django

我是django的新手,在解决导致项目错误的原因时遇到了问题。我试图通过维护和扩展现有项目来学习django。

(BPS_SE~1) C:\Users\BPS_Server>python manage.py migrate
    Traceback (most recent call last):
      File "manage.py`enter code here`", line 22, in <module>
        execute_from_command_line(sys.arg**strong text**v)
      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 341, in execute
        django.setup()
      File "C:\Python27\lib\site-packages\django\__init__.py", line 27, in setup
        apps.populate(settings.INSTALLED_APPS)
      File "C:\Python27\lib\site-packages\django\apps\registry.py", line 85, in populate
        app_config = AppConfig.create(entry)
      File "C:\Python27\lib\site-packages\django\apps\config.py", line 90, in create
        module = import_module(entry)
      File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
        __import__(name)
    ImportError: No module named account

1 个答案:

答案 0 :(得分:0)

settings.py 中插入您的django应用程序名称,并确保您在 migration 之前还运行 makemigrations ,如果问题更明确。 如果此答案无济于事,请编辑您的问题以获得更好的理解。