Question

Converting a project from django into a flask API backend + backbone.js frontend

It was nice to be able to do {% include %} options in the HTML in order to make it more modular, i.e. I was able to separate out a discrete navbar.html, base.html, etc.

Is there an easy way to recreate this same structure in the absence of a web framework and if I am just building a frontend in HTML / JS?

Was it helpful?

Solution

There are a lot of options, try searching. I usually go with Mustache or Handlebars

OTHER TIPS

If you were looking for something pretty lightweight, you could try this https://github.com/psychobunny/dcp.templates

It was modelled after PHP templating engines like Smarty / phpBB's, but without much complexity... great for abstracting template files.

Otherwise like Joseph said, Handlebars is the way to go!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top