module has no attribute

后端 未结 4 871
忘了有多久
忘了有多久 2020-11-30 05:41

I have a directory with a number of .py files in it. each file defines some classes. I also have an empty __init__.py in the directory.

Fo

4条回答
  •  自闭症患者
    2020-11-30 05:44

    You need an __init__.py in the myproject directory too. So your module structure should be:

    myproject
        __init__.py
        mymodule
            __init__.py
            api.py
            models.py
            views.py
    

提交回复
热议问题