[mod_python] examples of using simpletal with modpython

Julien Cigar jcigar at ulb.ac.be
Wed Aug 30 16:26:45 EDT 2006


Hello,

I'm using simpleTAL with mod_python every day at work and it works like 
a charm !
I've written my own handler which dispatch the "action" (based on regex) 
to the good controller (I followed the MVC pattern).
The structure looks like:
root/application/models
root/application/controllers
root/application/views
root/public
...

If it can help you, I've put some (colored) examples of my code at 
http://mordor.ath.cx/stuff/mod_python/
- dispatch.html is the dispatcher
- base.html is the base controller from which all controllers inherits
- default.html is an example of controller which use simple a simpleTAL 
context (which is render through self.render())
(This is development code therefore there are many things to improve)

Regards,
Julien

David Bear wrote:
> I was wondering if there are any examples of using simpletal with
> modpython.. if you use it in conjuction with publisher, or have
> written your own handler to use it.
>
> I seems that it would work well with publisher becuase you could pass
> a controlled namespace to the simpletal template. 
>   



More information about the Mod_python mailing list