Nandhakumar Sellappan
Nandhakumar Sellappan

Reputation: 120

HTML code with curly braces

I have recently seen one HTML page.The code is embed with curly braces.Values for tags and loops are closed by curly braces.

            {% if authenticated %}
            <h1>Current User</h1>
            <p>{{user}}</p>
            {% else %}
            <h1>Current User</h1>
            <p>None</p>
            {% endif %} 

What is the actaul use of these type of code?

Is HTML embedded with any other language?

Upvotes: 1

Views: 8895

Answers (2)

user3497034
user3497034

Reputation:

This may be Django script templates. Find more here.

Upvotes: 3

Wavemaster
Wavemaster

Reputation: 1824

This looks like the HTML is enriched with underscore.js or a similar templating engine.

It's used for displaying JavaScript data in your HTML without the need to know how JavaScript works.

Upvotes: 1

Related Questions