Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meeting pages look funny #2815

Closed
ThiefMaster opened this issue Jan 31, 2017 · 4 comments
Closed

Meeting pages look funny #2815

ThiefMaster opened this issue Jan 31, 2017 · 4 comments
Labels

Comments

@ThiefMaster
Copy link
Member

ThiefMaster commented Jan 31, 2017

{% set previous_date = date %} at the end of a loop to check whether the value changed since the last iteration only worked because of a jinja bug (cross-loop sets were never supposed to work), which has been fixed in Jinja 2.9.

There are currently various workarounds that are more or less ugly (mutable objects with the do extension, or the groupby filter), but possibly there will be a clean solution to access the previous loop item in Jinja until 1.9.10 is ready for production.

Related jinja issue: pallets/jinja#641

funny

@OmeGak
Copy link
Member

OmeGak commented Jan 31, 2017

A-ma-zing.

@ThiefMaster
Copy link
Member Author

Just to keep track of another place where legacy jinja scoping is used: indico/modules/events/timetable/templates/display/administrative/_session_block.html

this one could make use of need the namespace idea suggested in pallets/jinja#641 (or abuse a mutable object for now)

@ThiefMaster
Copy link
Member Author

ThiefMaster commented Feb 26, 2017

This change should be reverted and replaced with one using the namespace object once we use a Jinja version containing pallets/jinja#684

@ThiefMaster
Copy link
Member Author

ThiefMaster commented Mar 17, 2017

c509c68 should also be updated once Jinja has been updated. In case the commit hash is invalid due to a rebase by then, search for templates containing {% set __ =

@ThiefMaster ThiefMaster removed this from the v1.9.10 milestone Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants