Hello,

I'm having a strange issue with importing my own modules into the view
module for an application.

What I have is this:

project/apps/application/module.py
project/apps/application/views/application.py

In application.py, I want to include module.py, but no matter which way
I try the import, I get a ViewDoesNotExist error because it cannot
locate the module. I have tried importing
"project.apps.application.module", "application.module", etc. and none
of it seems to work.

As an example, check out this file from a django image gallery:

http://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/file/gallery/trunk/apps/picturefolder/views/picturefolder.py

The line "from gallery.apps.picturefolder.fsobject import FSObject,
InvalidPath" is basically what I'm after: including a module from the
application folder.

What is strange is that I can import any module in my application in
the Python interactive session, but not in view module.

Is there something that I am missing?

Thank you in advance,

Rob

Reply via email to