Ha! Thanks a lot.

--Jonas Galvez

On Nov 23, 10:58 pm, Khaoz <[EMAIL PROTECTED]> wrote:
> yout urls need to be:
>
> urls = ('/', 'resources.someresource.hellew')
>
> or
>
> urls = ('/', 'app.bin.resources.someresource.hellew')
>
> On 23 nov, 22:21, Jonas Galvez <[EMAIL PROTECTED]> wrote:
>
> > I have the following directory structure:
>
> > app/
> >   bin/
> >     serve.py
> >   resources/
> >      __init__.py
> >      someresource.py
>
> > Where, serve.py is:
>
> > import os, sys, web
> > base = os.path.abspath(os.path.dirname(sys.argv[0]))
> > sys.path.append(os.path.join(base, os.path.pardir))
> > urls = ('/', 'hellew')
> > from resources.someresource import hellew
> > app = web.application(urls, globals())
>
> > and someresource.py is:
>
> > class hellew:
> >   def GET(self):
> >     return "Hellew World!"
>
> > and when I tri to accesshttp://localhost:8080/, I get:
>
> > Traceback (most recent call last):
> >   File "c:\home\Dev\Python25\Lib\site-packages\web\application.py",
> > line 180, in process
> >     return p(lambda: process(processors))
> >   File "c:\home\Dev\Python25\Lib\site-packages\web\application.py",
> > line 501, in processor
> >     h()
> >   File "c:\home\Dev\Python25\Lib\site-packages\web\application.py",
> > line 67, in reload_mapping
> >     self.mapping = getattr(mod, mapping_name)
> > TypeError: getattr(): attribute name must be string
>
> > Ouch. Am I doing anything wrong?
>
> > --Jonas Galvez
--~--~---------~--~----~------------~-------~--~----~
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