defunkt / pystache

Mustache in Python
http://mustache.github.com/
MIT License
1.31k stars 308 forks source link

pystache.render should take an optional delimiters parameter #147

Open georgevreilly opened 11 years ago

georgevreilly commented 11 years ago

The public pystache.render function should take an optional delimiters parameter. Lower-level functions take delimiters as an optional parameter, but there's no easy way to pass custom delimiters down into them.

I know that, as a workaround, the template can be prefixed with Set Delimiter tags, such as {{=<% %>=}}, but this is tedious.

cjerdonek commented 11 years ago

Another work-around is to set the DELIMITERS global. Does that work for your use case? But I agree it should be exposed.

georgevreilly commented 11 years ago

I suppose that would work, but it's ugly. My use case is two-phase template evaluation, build-time and run-time.

cjerdonek commented 11 years ago

I suppose that would work, but it's ugly.

Agreed. That's why I called it another work-around. :grinning:

pavanmehta91 commented 4 years ago

How amazing is that. I've the same requirement @georgevreilly and that too after 7 years. I suppose this one is not solved then.