GithubHelp home page GithubHelp logo

sahwar / jinja Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pallets/jinja

0.0 1.0 0.0 5.09 MB

A very fast and expressive template engine.

Home Page: https://palletsprojects.com/p/jinja/

License: BSD 3-Clause "New" or "Revised" License

Python 99.15% HTML 0.01% Vim Script 0.84%

jinja's Introduction

Jinja

Jinja is a fast, expressive, extensible templating engine. Special placeholders in the template allow writing code similar to Python syntax. Then the template is passed data to render the final document.

It includes:

  • Template inheritance and inclusion.
  • Define and import macros within templates.
  • HTML templates can use autoescaping to prevent XSS from untrusted user input.
  • A sandboxed environment can safely render untrusted templates.
  • AsyncIO support for generating templates and calling async functions.
  • I18N support with Babel.
  • Templates are compiled to optimized Python code just-in-time and cached, or can be compiled ahead-of-time.
  • Exceptions point to the correct line in templates to make debugging easier.
  • Extensible filters, tests, functions, and even syntax.

Jinja's philosophy is that while application logic belongs in Python if possible, it shouldn't make the template designer's job difficult by restricting functionality too much.

Installing

Install and update using pip:

$ pip install -U Jinja

In A Nutshell

{% extends "base.html" %}
{% block title %}Members{% endblock %}
{% block content %}
  <ul>
  {% for user in users %}
    <li><a href="{{ user.url }}">{{ user.username }}</a></li>
  {% endfor %}
  </ul>
{% endblock %}

Links

jinja's People

Contributors

alexwlchan avatar berkerpeksag avatar birkenfeld avatar davidism avatar drewja avatar etiennepelletier avatar jab avatar jdufresne avatar jeffwidman avatar kevin-brown avatar kristi avatar kschuetz avatar lakinwecker avatar lkarthee avatar lukasa avatar mgax avatar minho42 avatar mitsuhiko avatar msabramo avatar plaes avatar rduplain avatar snoack avatar steelywing avatar terminalmage avatar the-compiler avatar thiefmaster avatar thomaswaldmann avatar tux21b avatar untitaker avatar yole avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.