summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2019-10-18 11:37:37 -0700
committerDavid Lord <davidism@gmail.com>2019-10-18 11:37:37 -0700
commit36ba2502024dbe57fff33ba684c2888a940ccd63 (patch)
tree07174fee6585ab12a957ee989dd8b74ce7f7a26f
parentaad4dcfc0f6ef07d5f73c65a11e5e674dc89339b (diff)
downloadjinja2-36ba2502024dbe57fff33ba684c2888a940ccd63.tar.gz
document lack of file extension
closes #547
-rw-r--r--docs/templates.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/templates.rst b/docs/templates.rst
index 46a237f..409751a 100644
--- a/docs/templates.rst
+++ b/docs/templates.rst
@@ -57,6 +57,20 @@ configured as follows:
* ``# ... ##`` for :ref:`Line Statements <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