On Tue, Mar 18, 2014 at 10:37 AM, cwalet <[email protected]> wrote:
> I tried to create some sub-packages into the dir: controllers, I make the
> dir "subdir" under "controllers",and then write it down to the app.py like
> this:
>
> urls = {
>     '/abc/test',      'controllers.subdir.test.View'
> }
>
> app = web.application(urls, globals())
>
> but after restart web.py didn't find the class test,I don't know why and how
> to fix it.
> Any help would be so nice to me,thx!

I think you have to import the View class into the current
*namespace*;  something like this:

from controllers.subdier.test import View

...

urls = {
  '/abc/test', View
}


Ciao,

Matteo

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to