Open straup opened 9 years ago
@straup & @AYTAGH ---
Unless customized, Jinja2 is configured by Flask as follows:
* autoescaping is enabled for all templates ending in .html, .htm, .xml as well as .xhtml
* a template has the ability to opt in/out autoescaping with the {% autoescape %} tag.
* Flask inserts a couple of global functions and helpers into the Jinja2 context, additionally to the values that are present by default.
I am guessing you were just trying to encourage best practices, so even if the above ... it looks like he can also do.
{{ myvariable|safe }}
or from the Jinja2 docs - http://jinja.pocoo.org/docs/dev/templates/#html-escaping
{{ myvariable|e }}
Curious to hear @straup thoughts on this...
Lastly though, we should get this up and running somewhere like Heroku so others can poke at it too.
-m
If Jinga has a built-in escaping function (like Smarty) so much the better.
Pagination is really simple. And then it won't be forgotten (because it will be). It's a "while" loop. You can probably just copy/paste from the visit exports code.
As for a CLI version move all the fetching/rendering logic in to a separate function that is invoked by your "routing" function. Make sure it works. Then move that function in to a library. Then invoke that function from a command line tool which is basically a different "route".
crouching keyboard / hidden typos
On Jul 6, 2015, at 10:51, Micah Walter notifications@github.com<mailto:notifications@github.com> wrote:
@strauphttps://github.com/straup & @AYTAGHhttps://github.com/AYTAGH ---
Unless customized, Jinja2 is configured by Flask as follows:
I am guessing you were just trying to encourage best practices, so even if the above ... it looks like he can also do.
{{ myvariable|safe }}
or from the Jinja2 docs - http://jinja.pocoo.org/docs/dev/templates/#html-escaping
{{ myvariable|e }}
Curious to hear @strauphttps://github.com/straup thoughts on this...
Lastly though, we should get this up and running somewhere like Heroku so others can poke at it too.
-m
— Reply to this email directly or view it on GitHubhttps://github.com/cooperhewitt/label-book/issues/3#issuecomment-118937844.
Keeping in mind that things are still "in motion", yeah?
per_page
limit to 500 and make the problem appear to go away but you know...