Jinja Python - Fast Expressive Templating Engine - Advent of code Jinja2

Опубликовано: 06 Октябрь 2024
на канале: InvalidEntry
9,115
113

As part of Advent 2021, I’m doing a review of some fun and useful python libraries – 24 libraries in 24 days, and today we’re looking at Jinja, (or to be precise, Jinja2) which is one of those libraries which I don’t get to use very often, mainly because a lot of my coding is done inside of Django, which has an inbuilt templating library.

The Jinja template is very similar to the Django one – but because you don’t have the default Django template loaders, you have to configure it yourself, so In this video, we’ll configure to pull from templates and start using some of the power of the template.

Templates allow you to separate your business logic from your display logic – again, allowing you to focus and use better programming on one rather than the other.

This is also roughly the halfway point of #teamseas, so a reminder that if you haven't donated, please do!