Unresolved import: models

前端 未结 9 1107
星月不相逢
星月不相逢 2020-12-03 03:32

I\'m doing my VERY first project using python/django/eclipse/pydev following this guide

http://docs.djangoproject.com/en/dev/intro/tutorial01/

My only additi

9条回答
  •  不知归路
    2020-12-03 04:02

    I was having a single import error when working in PyDEV in eclipse.

    I was importing it like

    from xyz_module import abc
    

    So I clicked "Ctl + 1" and "select Unresolved import error" in eclipse and it created a class file in a python file.

    It turned out that I had created an application called "xyz_module" and a "xyz_module.py" file (with the same name that is) and this was causing an import error. I changed the python file to a new name and this resolved the error.

提交回复
热议问题