Software Alternatives & Reviews

Jinja2 VS Haml

Compare Jinja2 VS Haml and see what are their differences

Jinja2 logo Jinja2

Jinja2 is a template engine written in Python.

Haml logo Haml

HTML Abstraction Markup Language - A Markup Haiku
  • Jinja2 Landing page
    Landing page //
    2023-09-24
  • Haml Landing page
    Landing page //
    2021-09-22

Jinja2 videos

Python and Jinja2 Cisco Network Automation

More videos:

  • Review - Python and Flask - Diving into Jinja2

Haml videos

How to Get Baby in Urdu&Hindi | Hamal Check krny ka Treeka | Haml Ghar Ma Chk Krain | Get B In Urdu

Category Popularity

0-100% (relative to Jinja2 and Haml)
Javascript UI Libraries
76 76%
24% 24
Development
84 84%
16% 16
Programming
0 0%
100% 100
Tool
100 100%
0% 0

User comments

Share your experience with using Jinja2 and Haml. For example, how are they different and which one is better?
Log in or Post with

Social recommendations and mentions

Based on our record, Haml should be more popular than Jinja2. It has been mentiond 17 times since March 2021. We are tracking product recommendations and mentions on various public social media platforms and blogs. They can help you identify which product is more popular and what people think of it.

Jinja2 mentions (4)

  • fetching list elements using jinja2 under flask app
    I have a list say list[a][b] of length 10.I want to print from list[0][b] to list[10][b] and use it in jinja2 template. Source: about 2 years ago
  • Jinja2: How to create multidimensional javascript array?
    I am using Flask with Jinja2 as templating language. Source: about 2 years ago
  • Issue a POST request with url_for in Flask
    I'm trying to issue a POST request within a Jinja template in Flask. However, parameters are passed in via GET by default, and this particular method only accepts POST requests. Source: about 2 years ago
  • Build a CRUD application with Flask and SQLAlchemy
    For our application above, we defined the string "My flask app" within our Python code. This was okay, as it was a single line, but as our front-end code grows, it will be cumbersome to define everything in our Python file. Flask allows for separation of concerns though so-called "templates." These are usually .html files, with some Python logic mixed in through the Jinja template engine language. Let's add a... - Source: dev.to / almost 3 years ago

Haml mentions (17)

  • Building a syntax highlighting extension for VS Code
    First of all, I like Slim. I like the beauty and cleanness of Slim templates, to me they are way more readable than regular ERB templates and I think they fit in the ruby/Rails ecosystem very well. Slim is a close cousin to Haml, without the ugly percent characters, haha. I've used Slim exclusively in my projects since about 2016. - Source: dev.to / 6 months ago
  • Hamlet: A type-safe Haml template engine for Go
    > I can't say what problem it is supposed to solve "Haml accelerates and simplifies template creation" https://haml.info/ If you'd rather write raw HTML, keeping track of closing tags etc, then don't use HAML. No need to bash it because you personally feel it is ugly or unnecessary. FWIW I personally feel the exact opposite. - Source: Hacker News / 4 months ago
  • Hamlet: A type-safe Haml template engine for Go
    There is a better side by side of the syntax here https://haml.info (i've been using haml for 17 years lol, I find it more enjoyable to read and write). - Source: Hacker News / 4 months ago
  • Any web frameworks that could compare to Symfony?
    Personally, I'd recommend Maud if you don't need something with runtime reloading. Not only is it much faster, it implements a template language that is effectively the Rust-syntax equivalent to Slim or Haml using a procedural macro, so you get compile-time verification that your HTML output is well-formed. Source: about 1 year ago
  • Rux: A JSX-inspired way to render view components in Ruby
    Does this support HAML-style syntax? We're 100% HAML-only for templating, whether normal Rails views or ViewComponent... https://github.com/haml/haml so going back to writing HTML or ERB feels like a huge downgrade. - Source: Hacker News / about 1 year ago
View more

What are some alternatives?

When comparing Jinja2 and Haml, you can also consider the following products

Pug - Pug is a robust, elegant, feature rich template engine for Node.js

Handlebars - Handlebars is a JavaScript template library that is, more or less, based on ...

mustache - Mustache is a simple web template system with implementations available for ActionScript, C++...

EJS - An open source JavaScript Template library.

Apache Velocity - Velocity is a Java-based template engine.

jquery-template - A template plugin for jQuery. Allows templating without cluttering JavaScript code with markup.