I created my own Django directory structure application
/appname __init__.py models.py /submodule1 __init__.py a.py
Inside a.py I have the following import
from ..models import Something
This is normal if I have /appname inside my /djangoproject folder, but when I install the application in Python site packages (via setup.py that I created), all hell breaks up and a.py cannot import Something longer with following error:
ImportError: cannot import name Something
Here is setup.py:
from distutils.core import setup setup(name='appname', version='0.1', packages=['appname', 'appname.contrib'], )
source share