Simon Willison’s Weblog

Subscribe

5 items tagged “templates”

2019

datasette-template-sql (via) New Datasette plugin, celebrating the new ability in Datasette 0.32 to have asynchronous custom template functions in Jinja (which was previously blocked by the need to support Python 3.5). The plugin adds a sql() function which can be used to execute SQL queries that are embedded directly in custom templates. # 15th November 2019, 12:59 am

2007

Seasoning Templates. “Designing a template language is a lot like seasoning a dish; there’s a whole range of tastes out there.” # 19th July 2007, 6:04 pm

Logic in Templates. I don’t think it would hurt Django to have a bit more support for conditional logic in templates, but I wouldn’t go as far as supporting the ability to call Python functions directly. # 19th July 2007, 8:35 am

Naming URL patterns (via) You can now apply a name to a URL pattern in Django development version, which makes the {% url %} template tag far more useful. # 10th April 2007, 12:19 am

Django templates in Venus. It’s nice to see the Django template system being used outside the context of the overall framework. # 14th February 2007, 11:22 pm