Introduction to macros

Jinja macros are reusable pieces of templated code. They’re similar to functions in other languages, such as Python.

Why do we need macros?

Sometimes, we find ourselves rewriting the same logic over and over again. For example, we might be grouping by day and summing potatoes sold:

Get hands-on with 1400+ tech skills courses.