Using just the Mako part of Pylons?

John Salerno johnjsal at gmailNOSPAM.com
Fri Jun 27 23:10:53 EDT 2008


John Salerno wrote:
> I just installed Pylons onto my hosting server so I could try out 
> templating with Mako, but it seems a little more complicated than that. 
>  From the look of it all, the site seems to want a full Pylons 
> application. Is it possible to just use regular HTML files with a bit of 
> the Mako language embedded, or will I actually have to use all aspects 
> of Pylons?
> 
> In other words, can I use *just* Mako (sort of like as a replacement for 
> PHP) without having to use a framework?
> 
> For example, I'd like to just test out the <%include /> tag and see it 
> in action, but the site doesn't seem to be looking for a regular HTML 
> file (like index.html), it seems to want a "controller". So is Pylons 
> overkill for just this? How would I try out *just* Mako?
> 
> Thanks!

Ok, I figured out how to get it to just use regular HTML files as if it 
were a regular, static site. However, the include directive I used 
didn't seem to work. I used:

<%include file="separate.html"/>

And it just shows that text in the browser. Am I missing something?



More information about the Python-list mailing list