From: Morgan K. <mk...@ve...> - 2006-10-06 18:04:02
|
I am pretty new the the wonderful world of html page creation. I am using cherrypy because of its python interface which also gives me the ability to connect to my postgres database. I am creating some tests programs right now, and am mostly in an exploration phase at the moment. So far its great! However, I am very interested in being able to integrate images from outside the database into pages displaying hits from the database. I already setup a simple framework to do this. However, I was forced to strictly mirror the setup I found in an example program. First of all this is considered in cherrypy as serving static content... correct? So I setup a directory literally called "static" in the same directory as where I run the cherrypy app from. I set the following values in the config file: static_filter.root="mydirhere" (mydirhere is the base dir for the app") staticFilter.on = True staticFilter.dir ="static" Then in my app I create images based on the results retrieved from the database, place them in that static directory, and then server them up through href tags in my html pages. That works great! However, as soon as I try to use a directory other than static... say cache.. and then change the config variable staticFilter.dir = "cache", it complains that it can't find the images when I request them in cherrypy. Naturally I change the variables associated with these paths inside the python code as well. Shouldn't this be possible? Am I missing some other config variable? Thanks for the help in advance! |