List Info

Thread: problem with static content




problem with static content
user name
2006-11-02 13:34:25
Hi Bussiere,

I see one problem right away...

On 11/2/06, Bussiere < bussieremaillistgmail.com">bussieremaillistgmail.com> wrote:

import cherrypy,os
current_dir = os.path.dirname(os.path.abspath(__file__))
settings = {

 &nbsp;   ; &nbsp; &nbsp; &nbsp; 'global':{
&nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; 'server.socket_port' : 664,
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;  'tools.staticdir.root' : current_dir
 &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;},
   ; &nbsp; &nbsp; &nbsp; &nbsp; 'img':{
&nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ' tools.staticdir.on' : True,
&nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp; 'tools.staticdir.dir' : "img&quot;
 ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; }

 &nbsp;   ; &nbsp; &nbsp; &nbsp; }

 You need to prefix your "img&quot; config section with a forward slash.&nbsp; It should look like this:
'/img'

Aside from that, check out the documentation on static content on the wiki.
http://www.cherrypy.org/wiki/StaticContent

Good luck!

Christian
http://www.dowski.com



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users&quot; group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )