Basic Jinja Syntax and Filters
Identify common Jinja syntax and filters + Use the Live Editor to practice Jinja code on data from the context
Last updated
Identify common Jinja syntax and filters + Use the Live Editor to practice Jinja code on data from the context
Last updated
Feedback
⬆️ CannyCopyright © 2024 Rewst
💡 It's time to tackle basic Jinja syntax and filters. These building blocks will help you write and practice Jinja code in the Jinja Live Editor, and eventually use it in your Rewst workflows.
Key Concepts About Jinja Syntax
Review Context Data from the "Building a Basic Form and Workflow" Lesson
Open the workflow results from your "Add or Remove User - Microsoft Group" workflow and review the context data. Practice rendering the following Jinja code in the Jinja Live Editor, and notice that the results match the values of the context data for the variables:
{{ CTX.action }}
{{ CTX.user_id }}
{{ CTX.group_id }}
Complete the Lunch Menu Exercises:
Navigate to the "Lesson Resources" section to access the "Lunch Menu" sample data set and instructions for using Jinja syntax and filters in the Jinja Live Editor. Focus on:
Rendering values from the context
Applying Jinja filters to format the output
Practicing list comprehension (using two different methods -- a Jinja statement, and list comprehension).
By practicing these exercises, you’ll solidify your understanding of Jinja syntax, filters, and data manipulation in Rewst workflows.
Go to the previous module:
Go to the next module: