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.
Antworten
Paulina

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

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).
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

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 (former) Modvoice
mitsuhiko
User
Beiträge: 1790
Registriert: Donnerstag 28. Oktober 2004, 16:33
Wohnort: Graz, Steiermark - Österreich
Kontaktdaten:

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

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:

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

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

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:

Antworten