mapping HTML::Mason to Mako

25 views
Skip to first unread message

Eddie Rowe

unread,
Jul 31, 2019, 3:48:22 PM7/31/19
to Mako Templates for Python
I'm a long-time user of HTML::Mason and am moving toward more Python use which is how I stumbled upon Mako.  Two things I haven't been able to figure out:

1 - how to configure Apache to utilize Mako components

2 - A basic discussion of the analogue of HTML::Mason's autohandler (if there is such a thing in Mako)

Can someone point me in the right direction?

Mike Bayer

unread,
Jul 31, 2019, 4:00:02 PM7/31/19
to mako-d...@googlegroups.com
there *IS* an autohandler!!!   I'm pretty sure you'd be the first person in 14 years to ever use it!     However it hasn't been touched in that time either and does not appear to have any tests so it might not work, but is worth a try, an example is in the source at https://github.com/sqlalchemy/mako/blob/master/mako/ext/autohandler.py

for apache, assuming you want apache to hit the Mako template directly like Mason did (which is VERY old school at this point), you want to use apache mod_wsgi and the handler you use is at https://github.com/sqlalchemy/mako/blob/master/examples/wsgi/run_wsgi.py .   Again this is all super old stuff since everyone uses web frameworks now, but it is doable if you really want to do it that way.



--
You received this message because you are subscribed to the Google Groups "Mako Templates for Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mako-discuss...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages