Python + CSS

Wenn du dir nicht sicher bist, in welchem der anderen Foren du die Frage stellen sollst, dann bist du hier im Forum für allgemeine Fragen sicher richtig.
Paulina

Python + CSS

Beitragvon Paulina » Sonntag 20. November 2005, 06:02

Hi, I am trying to view a html page on my CherryPy server, but it seems like it doesn't recognize the CSS file that comes with the html file. What is the problem? How can I solve it?

/Paulina
Clython
User
Beiträge: 151
Registriert: Samstag 21. August 2004, 13:58
Wohnort: Schweiz, BE-2500

Beitragvon Clython » Sonntag 20. November 2005, 11:08

In case you haven't noticed, this board is a German writing one. Now you have two possibilities:

1. Change to an English writing one
2. Learn German

To come back to your problem:

Are you sure that the error is not in your html-Code? Try pasting your code in a text-file and save it as whatever.htm an open it in your browser (be sure the path to your css-file is correct).
Benutzeravatar
Leonidas
Administrator
Beiträge: 16023
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Beitragvon Leonidas » Sonntag 20. November 2005, 12:04

Are you using TurboGears? TG has a 'static' Directory where all CSS Files can be stored.
My god, it's full of CARs! | Leonidasvoice vs Modvoice
Benutzeravatar
mitsuhiko
User
Beiträge: 1790
Registriert: Donnerstag 28. Oktober 2004, 16:33
Wohnort: Graz, Steiermark - Österreich
Kontaktdaten:

Beitragvon mitsuhiko » Sonntag 20. November 2005, 12:44

<mandatory post>
use wsgi and import the ChromeMiddleware ^^
</mandatory post>
TUFKAB – the user formerly known as blackbird
Paulina

Vielen Dank!

Beitragvon Paulina » Sonntag 20. November 2005, 21:37

Also, ich kann Deutsch sprechen und lesen, so bitte antworten Sie im Deutsch. However, I feel more comfortable writing in English.

I am not using TurboGears... I am using CherryPy and I wonder if it uses the same kind of static directories as TG. Do you know any good links where they explain this static directory thing?

Vielen Dank!
raist1314
User
Beiträge: 52
Registriert: Dienstag 21. September 2004, 06:58
Wohnort: Adelzhausen
Kontaktdaten:

Beitragvon raist1314 » Sonntag 20. November 2005, 22:14

As of version 2.1 CherryPy now has its own filter for static content called staticFilter. For an indepth explanation see 1.5 Static Content Handling.

Sebastian
Paulina

Filter

Beitragvon Paulina » Montag 21. November 2005, 00:41

One more question: When they say:

Second in the config file you must turn the filter on like this : filterName.on = True.


Where can I find this config file?

/Paulina
Paulina

Conf

Beitragvon Paulina » Montag 21. November 2005, 00:45

Sorry...and how do I specify when where and why this conf-file is to be used?
raist1314
User
Beiträge: 52
Registriert: Dienstag 21. September 2004, 06:58
Wohnort: Adelzhausen
Kontaktdaten:

Beitragvon raist1314 » Montag 21. November 2005, 09:07


Wer ist online?

Mitglieder in diesem Forum: Bing [Bot]