Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-25-2008, 05:19 PM   #1
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
mod_python/PSP webpage not seeing style sheets. Why for?

I'm just starting a mod_python PSP (Python Server Pages) page. My very initial start is to simply reprint an html page. The code looks like so:

from mod_python import psp
def index(req):
    return psp.PSP(req,'templates/index.html')
which works, but the stylesheet that's linked in the html file is not being used (i.e., there's no stylesheet on the resulting page).

Does anyone know why this is? Does it have something to do with my .htaccess file maybe? If it matters, the .htaccess for this dir looks like:

SetHandler mod_python
PythonHandler mod_python.publisher
PythonDebug On
I don't see anything in the docs about it, but.. I'm still reading. In the mean time, if anyone knows, I'd greatly appreciate a pointer or two.


edited to add:
In the html file, the link to the style sheet looks like so:
<link rel="StyleSheet" href="stylesheet.css" type="text/css">
As an attempt, I've put the stylesheet both in the CWD and in ./templates where index.html lives.

Last edited by BrianK; 04-25-2008 at 05:21 PM.
Old 04-25-2008, 07:06 PM   #2
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
Solved it.

If anyone else runs into this problem, you need to put the style sheet in a directory that has no handler for apache. In other words, make a stylesheet directory, but the stylesheet in there, then add an htaccess file that looks like:

SetHandler None


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache/mod_python problem: ImportError: No module named mod_python.apache BrianK Linux - Software 2 10-10-2007 05:13 PM
style sheets... in konqueror? patolfo Debian 1 09-23-2006 01:58 PM
How to know if I am using mbox-style or maildir-style? Niceman2005 Linux - General 1 09-23-2005 12:08 PM
VIM-style wrapping to OpenOffice style schmmd Linux - Software 1 12-21-2004 06:50 PM
Web Browsers and Cascading Style Sheets CliffLandin Linux - Software 8 12-09-2003 08:58 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration