From 36ba2502024dbe57fff33ba684c2888a940ccd63 Mon Sep 17 00:00:00 2001 From: David Lord Date: Fri, 18 Oct 2019 11:37:37 -0700 Subject: [PATCH] document lack of file extension closes #547 --- docs/templates.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/templates.rst b/docs/templates.rst index 46a237f4..409751a3 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -57,6 +57,20 @@ configured as follows: * ``# ... ##`` for :ref:`Line Statements ` +Template File Extension +~~~~~~~~~~~~~~~~~~~~~~~ + +As stated above, any file can be loaded as a template, regardless of +file extension. Adding a ``.jinja`` extension, like ``user.html.jinja`` +may make it easier for some IDEs or editor plugins, but is not required. +Autoescaping, introduced later, can be applied based on file extension, +so you'll need to take the extra suffix into account in that case. + +Another good heuristic for identifying templates is that they are in a +``templates`` folder, regardless of extension. This is a common layout +for projects. + + .. _variables: Variables -- 2.47.3