That's actually a python question. You should first create an empty
``__init__.py`` file in the ``app`` dir, and then do

   import app.test

app.test means one of the following:

1. app directory that contains a file called test.py
2. app.py which contains something called test
3. app directory that contains a test directory and test contains
empty __init__.py
4. (I'm not sure about this) __init__.py in app dir contains something
called test.

In your case, it's number 1.

On Wed, Apr 28, 2010 at 7:43 PM, vlatko <[email protected]> wrote:
> Why i cant make this to work
> i have folder  'app' and inside folder i have file 'test.py'
> what is the procedure to make this work like application.
> when i put 'import app.controllers'   shows error 'no module
> app.controllers'
> How i can make subdirectories to call like MVC and this to work.
> My  webpy library is in folder inside my application and i call 'web'
> with
> symlinks .
> Folder structure:
> /PROJECT/
>              /app/test.py
>              /webpy/
>              code.py
>              settings.py
>
> and in code.py i have:
> import os
> import web
> from settings import *
> import app.controllers  ---> ERROR "no module app.controllers"
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/webpy?hl=en.
>
>



-- 
Branko Vukelić

[email protected]
[email protected]

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to