wbond / pybars3

Handlebars.js template support for Python 3 and 2
GNU Lesser General Public License v3.0
179 stars 46 forks source link

Add support for partial blocks #78

Open zwade opened 2 years ago

zwade commented 2 years ago

Hi, I'm interested in adding partial block support to pybars3 for use in one of my projects! This is my first time contributing to pybars so I'm not sure what the current status of external contributions is, but if you're willing to accept contributions I'm happy to work within your guidelines & best practices!

This PR adds in support for the partial block feature of handlebar. It adds the bear minimum functionality, namely fallbacks for missing templates and the use of the special {{> @partial-block}} partial for embedding content from caller to callee.

Let me know if this is something you're willing to include in the library, and what additional changes are needed to get there.

Thanks!

(addresses #72)