jinja2
Import / include assigned variables in Jinja2
In Jinja2, how can one access assigned variables (i.e. {% set X=Y %}) within files incorporated with include?[详细]
2023-01-03 05:35 分类:问答Sharing Jinja2 templates between Pylons and Django applications
I\'m writing a couple of Jinja2 templates that basically implement some common grid layouts.I\'d like to be able to share this \'library\' of templates between a Pylons app and Django app.[详细]
2023-01-02 03:22 分类:问答Create Jinja2 macros that put content in separate places
I want to create a table of contents and endnotes in a Jinja2 template. How can one accomplish these tasks?[详细]
2022-12-31 21:00 分类:问答Jinja2 returns "None" string for Google App Engine models
Google App Engine models, likeso: from google.appengine.ext.db import Model class M(Model): name = db.StringProperty()[详细]
2022-12-27 17:05 分类:问答Jinja2 in Google App Engine
I have started using Jinja2 as my templating engine on Google App Engine (in 开发者_StackOverflow社区Python).[详细]
2022-12-22 03:54 分类:问答String concatenation in Jinja
I just want to loop through an existing list and make a comma delimited string out of it. Something like thi开发者_Go百科s: my_string = \'stuff, stuff, stuff, stuff\'[详细]
2022-12-17 09:46 分类:问答Multiple level template inheritance in Jinja2?
I do html/css by trade, and I have been working on and off django projects as a template designer. I\'m currently working on a site that uses Jinja2, which I have been using for about 2 weeks. I just[详细]
2022-12-15 05:07 分类:问答How can I access response.context when testing a Jinja2 powered Django view
When I use the Django test.client and I do something like: class MyTestCase(TestCase): def test_this(self):[详细]
2022-12-14 18:10 分类:问答How do you sort a list in Jinja2?
I am trying 开发者_高级运维to do this: {% for movie in movie_list | sort(movie.rating) %} But that\'s not right...the documentation is vague...how do you do this in Jinja2?As of version 2.6, Jinja[详细]
2022-12-14 16:31 分类:问答Get loop index of outer loop
In jinja, the variable loop.index holds the iteration number of the current running loop. When I have nested loops, how can I get in the inner loop the cu开发者_JAVA技巧rrent iteration of an outer lo[详细]
2022-12-08 06:59 分类:问答