Von: cyclopsvs <mendes...@gmail.com>
Datum: Thu, 18 Oct 2007 07:02:07 -0000
Lokal: Do 18 Okt. 2007 09:02
Betreff: Re: html css content handling
The images are now working also. directory build explained in previous message [/] [/css] in the application itself the following code exists current_dir = os.path.dirname(os.path.abspath(__file__)) cherrypy.config.update(os.path.join(os.path.dirname(__file__),'app.conf')) conf = {'/css': {'tools.staticdir.on': True, cherrypy.quickstart(EndUserSupport(),config=conf) with this all the files that are in directory css will be presented on hope someone else can use this. richard On Oct 18, 8:22 am, cyclopsvs <mendes...@gmail.com> wrote: > A small response for people who are dealing with the same problems.
> I figured out a part of the solution. > the directory is build in the following way > endUser \ > i altered the config file just a bit, > [/] > [/style.css] > in my endUserSupport.py itself the following code exists > current_dir = os.path.dirname(os.path.abspath(__file__)) > cherrypy.config.update(os.path.join(os.path.dirname(__file__),'app.conf')) > 'tools.staticfile.filename': os.path.join(current_dir, 'data', 'css', > this code will present the html file with css styling althought i > in the meantime i will keep trying to play around and see if i can > richard > cyclopsvs wrote: > > after my last post i really figured i could present a working example > > the thing that happens at this moment is that i see the css style > > my config file is constructed the following way: > > server.socket_host = "10.47.0.95" > > tools.staticdir.root = "/Users/mendes/Documents/verza/python/ > > server.ssl_certificate = "/Users/mendes/Documents/verza/ > > in my application i use the following syntax > > import os.path > > cherrypy.config.update(os.path.join(os.path.dirname(__file__),'app.conf')) > > and i try to present a html file by using cherrytemplate in the > > return renderTemplate(file='templates/index.htm') > > My first question is about the cherrypy.config.update is this really > > The other and most important question for me is about the presentation > > at this moment i get the content from the css file > > thanks in advance for you assistance, > > regards, > > richard Sie müssen sich anmelden, bevor Sie Nachrichten veröffentlichen können.
Bevor Sie eine Nachricht posten können, müssen Sie zunächst dieser Gruppe beitreten.
Bitte aktualisieren Sie vor dem Posten in den Abonnementeinstellungen Ihren Spitznamen.
Sie haben nicht die erforderliche Berechtigung zum Posten.
| ||||||||||||||