Google Mail Kalender Text & Tabellen Reader Web Mehr »
Kürzlich besuchte Gruppen | Hilfe | Anmelden
Google Groups-Startseite
Nachricht von Diskussion html css content handling
Bei der Gruppe, für die Sie eine Mitteilung verfassen, handelt es sich um eine Usenet-Gruppe. Wenn Sie in dieser Gruppe Nachrichten posten, ist Ihre E-Mail-Adresse für jeden im Internet sichtbar
Ihre Antwort wurde nicht gesendet.
Die Nachricht wurde übermittelt.
 
Von:
An:
Cc:
Nachtrag zu:
Cc hinzufügen | Nachtrag hinzufügen zu | Betreff bearbeiten
Betreff:
Bestätigung:
Geben Sie zur Bestätigung die im folgenden Bild angezeigten Zeichen oder die durchgesagten Zahlen ein, indem Sie auf das Eingabesymbol klicken. Hören Sie zu und geben Sie die gehörten Zahlen ein
 
cyclopsvs  
Profil anzeigen   Übersetzen in die Sprache: Übersetzt (Original anzeigen)
 Weitere Optionen 18 Okt. 2007, 09:02
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.
here's the way it's configured:

directory build explained in previous message

        [/]
        tools.staticdir.root = "/Users/mendes/Documents/verza/python/
scripts/endUser/data"

        [/css]
        tools.staticdir.on = True

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,
                             'tools.staticdir.dir':
os.path.join(current_dir, 'data', 'css')}}

       cherrypy.quickstart(EndUserSupport(),config=conf)

with this all the files that are in directory css will be presented on
the html file

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 \
>     endUserSupport.py
>     data \
>          css \
>               style.css
>               images.jpeg

> i altered the config file just a bit,
> instead of all the content that was in there containing the static
> paths i replaced them with

>          [/]
>          tools.staticdir.root = "/Users/mendes/Documents/verza/python/
> scripts/endUser/data"

>          [/style.css]
>          tools.staticfile.on = True
>          tools.staticfile.filename = "/Users/mendes/Documents/verza/
> python/scripts/endUser/data/css/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'))
>          conf = {'/css/style.css': {'tools.staticfile.on': True,

> 'tools.staticfile.filename': os.path.join(current_dir, 'data', 'css',
> 'style.css')}}

> this code will present the html file with css styling althought i
> still have a problem with the images called from the css file those
> aren't presented yet.
> if someone has the answer how to present these images i would really
> like to know.

> in the meantime i will keep trying to play around and see if i can
> figure it out myself.

> richard

> cyclopsvs wrote:
> > Hello All,

> > after my last post i really figured i could present a working example
> > to the project manager.
> > unfortunatly i ran into trouble once again. I looked at the
> > documentation about html pages which yield css styling but didn't
> > really understand.

> > the thing that happens at this moment is that i see the css style
> > sheet content instead of the html file content with the css style.

> > my config file is constructed the following way:

> >           server.socket_host = "10.47.0.95"
> >           server.socket_port = 8083
> >           server.thread_pool = 100

> >           tools.staticdir.root = "/Users/mendes/Documents/verza/python/
> > scripts/endUser/"
> >           tools.staticfile.on = True
> >           tools.staticfile.filename = "/Users/mendes/Documents/verza/
> > python/scripts/endUser/templates/images/style.css"

> >           server.ssl_certificate     = "/Users/mendes/Documents/verza/
> > python/scripts/endUser/keys/10.47.0.1.crt"
> >           server.ssl_private_key    = "/Users/mendes/Documents/verza/
> > python/scripts/endUser/keys/10.47.0.1.key"

> > in my application i use the following syntax

> >            import os.path

> > cherrypy.config.update(os.path.join(os.path.dirname(__file__),'app.conf'))
> >            cherrypy.quickstart(EndUserSupport(),config='app.conf')

> > and i try to present a html file by using cherrytemplate in the
> > following way

> >            return renderTemplate(file='templates/index.htm')

> > My first question is about the cherrypy.config.update is this really
> > necesarry to call upon because i don't really update anything at this
> > moment ?

> > The other and most important question for me is about the presentation
> > of the html file.

> > at this moment i get the content from the css file
> > ( tools.staticfile.filename path ) what do i have to do to present the
> > html file with the css styling ?

> > thanks in advance for you assistance,

> > regards,

> > richard


    Weiterleiten  
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.

Eine Gruppe erstellen - Google Groups - Google-Startseite - Nutzungsbedingungen - Datenschutzbestimmungen
©2010 Google