, ,

pallets/jinja

pallets/jinja

news image

Principal changes

Install or enhance

Install from PyPI with pip:

pip set up -U Jinja2

Changelog

  • Added a brand unique extension node known as OverlayScope that will likely be ancient to carry out an unoptimized scope that can uncover about up all variables from a derived context.
  • Added an in test that works love the in operator. This could well well maybe be ancient in aggregate with reject and choose.
  • Added previtem and nextitem to loop contexts, offering safe entry to to the old/subsequent merchandise in the loop. If such an merchandise would no longer exist, the worth is undefined.
  • Added changed(*values) to loop contexts, offering a uncomplicated formulation of checking whether or no longer a label has changed for the reason that closing iteration (or rather for the reason that closing call of the formulation)
  • Added a namespace characteristic that creates a varied object which permits attribute task the consume of the pickle model. This could well well maybe be ancient to raise knowledge across scopes, e.g. from a loop body to code that comes after the loop.
  • Added a trimmed modifier to {% trans %} to strip linebreaks and surrounding whitespace. Also added a brand unique coverage to allow this for all trans blocks.
  • The random filter is no longer any longer incorrectly fixed folded and can also just impact a brand unique random preference on every occasion the template is rendered. (#478)
  • Added a extraordinary filter. (#469)
  • Added min and max filters. (#475)
  • Added assessments for all comparison operators: eq, ne, lt, le, gt, ge. (#665)
  • import state cannot pause with a trailing comma. (#617, #618)
  • indent filter will no longer indent easy traces by default. (#685)
  • Add reverse argument for dictsort filter. (#692)
  • Add a NativeEnvironment that renders templates to native Python forms in preference to strings. (#708)
  • Added filter enhance to the block pickle model. (#489)
  • tojson filter marks output as uncover to compare documented behavior. (#718)
  • Resolved a trojan horse where getting debug locals for tracebacks could maybe well maybe alter template context.
  • Mounted a trojan horse where having many {% elif ... %} blocks resulted in a “too many ranges of indentation” error. These blocks now assemble to native elif ..: in preference to else: if ..: (#759)

Read More

What do you think?

0 points
Upvote Downvote

Total votes: 0

Upvotes: 0

Upvotes percentage: 0.000000%

Downvotes: 0

Downvotes percentage: 0.000000%