Opened on 03/19/2015 at 08:58:56 PM

Closed on 03/19/2015 at 09:27:57 PM

#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):

http://codereview.adblockplus.org/6359255103832064/

Description

Background

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.

Attachments (0)

Change History (3)

comment:1 Changed on 03/19/2015 at 08:59:16 PM by trev

  • Blocking 662 added

comment:2 Changed on 03/19/2015 at 09:02:08 PM by trev

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

comment:3 Changed on 03/19/2015 at 09:27:57 PM 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.

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from trev.
 
Note: See TracTickets for help on using tickets.