Re: [Tutor] Cherrypy and Iframes (or how to insert a file in a, page)

2011-04-10 Thread Andrés Chandía


Thanks a lot Alan, I'm a complete newbe in cherrypy, actually this is my first 
cherrypy, so I
had to go arround many tries to reach the goal, but your help was valuable and 
finally this is
the config that gave me success:

class helloworld(object):
   
indexpage = indexpage()
    _cp_config = {   
'tools.staticdir.on': True,
           
'tools.staticdir.root': '/path/to/root/folder',
       
    'tools.staticdir.dir': '',
       
    }


On Sun, April 10, 2011 01:04, Alan Harris-Reid wrote:

Andreas...

 >  NotFound: (404, "The path '/file.txt' was not
found.")

This error message often occurs because file.txt is a static file
and
you have not told CherryPy where to look for static files. 
>From the
look
of the error I am guessing that file.txt is in your root directory,
in which case you
need the following in your configuration file.

[/]
tools.staticdir.root =
'/path/to/root/folder' # no trailing backslash
tools.staticdir.on = True
tools.staticdir.dir = ""   # necessary
to
serve static files in home folder

Hope this helps.
Alan Harris-Reid

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor




___
andrés
chandía

P No imprima
innecesariamente. ¡Cuide el medio ambiente!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Cherrypy and Iframes (or how to insert a file in a, page)

2011-04-09 Thread Alan Harris-Reid


Andreas...

>  NotFound: (404, "The path '/file.txt' was not found.")

This error message often occurs because file.txt is a static file and 
you have not told CherryPy where to look for static files.  From the 
look of the error I am guessing that file.txt is in your root directory, 
in which case you need the following in your configuration file.


[/]
tools.staticdir.root = '/path/to/root/folder' # no trailing backslash
tools.staticdir.on = True
tools.staticdir.dir = ""   # necessary 
to serve static files in home folder


Hope this helps.
Alan Harris-Reid

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Cherrypy and Iframes (or how to insert a file in a page)

2011-04-09 Thread Andrés Chandía


the codes
return ""

file.txt is genereated by a
previous python script and I need to display it at the web generated by 
cherrypy, but it gives
me this error:


Traceback (most recent call last):
  File
"/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py", line 606, in respond
   
cherrypy.response.body = self.handler()
  File
"/usr/lib/pymodules/python2.6/cherrypy/_cperror.py", line 227, in __call__
   
raise self
NotFound: (404, "The path '/file.txt' was not found.")





I tryed changing the path with no success, so I guess is something
different

Maybe there is another way to do this


___
andrés
chandía

P No imprima
innecesariamente. ¡Cuide el medio ambiente!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor