[mod_python] Templaing question

Jim Gallacher jpg at jgassociates.ca
Tue Mar 7 17:26:57 EST 2006


Marinus,

You could email me the the screenshot but all that proves is that the 
page is not rendering properly and I'm happy to take your word on that 
score. :) Can I assume that it looks like the stylesheet is not being 
applied, as opposed to some malformed html being generated?

Have you had a chance to read the rest of this thread? Michael Guerrero 
was having a similar problem, so you might find some useful information.

Perhaps you could provide your the mod_python parts of your apache 
configuration. A snippet of your the html being produce may be helpful 
as well.

Jim

marinus van aswegen wrote:
> Hi Jim
> 
> Sorry for the late reply, the short answer perhaps a little bit of both.
> I was hoping that someone would give me some nice pointers to getting
> going with templates. I suspect that psp will give me what I want, I'm
> seeing strange behavior when it comes to rendering pages. I had a html page
> render correctly if I loaded it with a browser off the disk. I wrote a test
> function to load it as a template using psp and it produced
> the same strange behavior I saw with my hacked templating system. It's hard
> to explain its
> like the browser hap haggardly interprets the page and doesn't render it
> correctly.
> I could mail anyone a screenshot if they are interested.
> 
> Regs
> 
> 
> Marinus
> 
> 
> On 3/5/06, Jim Gallacher <jpg at jgassociates.ca> wrote:
> 
>>marinus van aswegen wrote:
>>
>>>Hi
>>>
>>>I need some advice; I'm up the creek without a paddle. I wanted to
>>
>>quickly
>>
>>>hack together a small project. I like python so, I thought hey lets try
>>>mod_python. I got some of the hard stuff sorted quickly e.g. login
>>>functions, session handling, etc. When it came to the presentation stuff
>>
>>I
>>
>>>had a quick look at some of the templating toolkits out there, they
>>
>>scared
>>
>>>me! I wanted something simple so I quickly hacked together a
>>>
>>>simple templating system, that loaded my html files, replaced the tags I
>>
>>hid
>>
>>>in them with the data I wanted send to the browser via req.write. The
>>>problem is that it renders the page in a weird way, kinda like it
>>
>>doesn't
>>
>>>give the browser a chance to interpret the css. Where do I go from here,
>>
>>I
>>
>>>want to give the client tables of data formatted with nice css.
>>>
>>>Marinus
>>
>>Hi Marinus,
>>
>>It's not clear if you're asking for help with debugging your templating
>>system or advise on alternatives? I'd suggest taking another look at
>>mod_python.psp since it's included in mod_python, and people on this
>>list are familiar with it and more likely able to offer help.
>>
>>Jim
>>
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list