Welcome, {{username}}! This page demonstrates the templating capabilities of the Beaker web framework.
Your favourite colour is: {{favourite_colour}}
The current year is: {{current_year}}
This is a safe string: {{safe_html|safe}}
This is an unsafe string (will be escaped): {{unsafe_html}}
Here are some features:
Here's some user information:
{{if user_logged_in}} User is logged in! {{else}} User is NOT logged in. {{endif}}
{{if role == "admin"}} Welcome, Admin! You have full access. {{elif role == "user"}} Welcome, User! You have standard access. {{else}} Welcome, Guest! You have limited access. {{endif}}
{{if status != "inactive"}} Account is active. {{else}} Account is inactive. {{endif}}
{{if exists username}} Username exists! {{else}} Username does NOT exist. {{endif}}
{{if not exists missing_var}} missing_var does NOT exist (as expected) {{else}} missing_var exists (unexpected!) {{endif}}