LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 04-25-2008, 06:19 PM   #1
BrianK
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:

Code:
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:

Code:
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.

Thanks.



edited to add:
In the html file, the link to the style sheet looks like so:
Code:
<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 06:21 PM.
 
Old 04-25-2008, 08:06 PM   #2
BrianK
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:

Code:
SetHandler None
 
  


Reply


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 06:13 PM
style sheets... in konqueror? patolfo Debian 1 09-23-2006 02:58 PM
How to know if I am using mbox-style or maildir-style? Niceman2005 Linux - General 1 09-23-2005 01:08 PM
VIM-style wrapping to OpenOffice style schmmd Linux - Software 1 12-21-2004 07:50 PM
Web Browsers and Cascading Style Sheets CliffLandin Linux - Software 8 12-09-2003 09:58 PM


All times are GMT -5. The time now is 01:49 PM.

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