[mod_python] PSP templates within publisher module

PETER BARKER newbarker at btinternet.com
Thu Mar 8 18:44:02 EST 2007


I have a website composed of some simple Python Server Page files and images in the same directory. The images are referenced from the pages without any qualification e.g. <img src="theimage.jpg"/> or <a href="about.psp">About us</a>. If the page is on http://localhost/company_name/index.psp, this works as http://localhost/company_name/theimage.jpg or http://localhost/company_name/about.psp is accessible. So far so good!
   
  I am adding a section to the website using the mod_python publisher handler. This will be implemented in a module called ClientArea.py. As part of this module, I want to be able to use the existing PSP files as templates and insert only the content relevant to the module. Assume I'm calling a function called "entryPoint" within this module, then the browser is now pointing at http://localhost/company_name/ClientArea.py/entryPoint. I am now having problems with the internal links because the unqualified link seems to be referring to an entity withing ClientArea.py - e.g. http://localhost/company_name/ClientArea.py/theimage.jpg. This resource doesn't exist though!
   
  I don't really want to duplicate the PSP pages and have one version with "../" prefixed. I also don't want to fully qualify the links.
   
  I welcome suggestions on what I should be doing here!
   
  Regards,
   
  Pete B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070308/790e5395/attachment.html


More information about the Mod_python mailing list