views:

14

answers:

0

Imagine a classic Django directory structure. INSTALLED_APPS contains an entry pointing to "myApp". I have models, views, etc. in that directory and it works fine. I've created a file called decorators.py in that directory.

In one of the views, I'm trying to import some of those decorators but I'm getting:

ImportError at /
No module named myApp.decorators

How's that possible? On previous line I import some models from models.py, which is in the same directory, and it works. What am I doing wrong?

django.VERSION = (1, 2, 1, 'final', 0)

Edit: Importing myApp.decorators works, but importing only selected methods with from ... import ... does not. Did I forget to read something in Django Doc about importing?