Opened 5 years ago

Closed 5 years ago

#2178 closed change (rejected)

[cms] Allow using {% do %} in Jinja2 templates

Reported by: trev Assignee: trev
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: Blocked By:
Blocking: #662 Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working:
Review URL(s):



The Jinja2 expression statement {% do ... %} is documented but requires an extension which we currently don't enable. Without it things like changing dictionary properties are very inconvenient however.

What to change

Make sure the extension is enabled in the Jinja2 environment.

Change History (3)

comment:1 Changed 5 years ago by trev

  • Blocking 662 added

comment:2 Changed 5 years ago by trev

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed 5 years ago by trev

  • Resolution set to rejected
  • Status changed from reviewing to closed

After discussing this with Sebastian, rejecting this: Sebastian feels that {% do %} has no place in a template and the logic should be moved to Python code. We can define a custom filter set_title instead.

Note: See TracTickets for help on using tickets.