summaryrefslogtreecommitdiff
path: root/docs/ref/django-admin.txt
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2016-01-24 10:06:01 +0100
committerTim Graham <timograham@gmail.com>2016-01-25 12:44:14 -0500
commit3306106fb1ce610e0961ce319a98e33c93795c1f (patch)
tree622734c413f22dc6a102502c2724643bbc6be5ac /docs/ref/django-admin.txt
parent20b217b0b0b94de374bf5b21285fed20c3880dfb (diff)
[1.9.x] Fixed #25968 -- Changed project/app templates to use a "py-tpl" suffix.
Debian packages unconditionally byte-compile .py files on installation and do not silence errors by design. Therefore, we need a way of shipping these invalid .py files without a .py extension but ensuring that when we template them, they end up as .py. We don't special-case .py files so that the all the TemplateCommand command-line options (eg. extra_files and extensions) still work entirely as expected and it may even be useful for other formats too. Backport of abc0777b63057e2ff97eee2ff184356051e14c47 from master
Diffstat (limited to 'docs/ref/django-admin.txt')
-rw-r--r--docs/ref/django-admin.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index 06a0374846..06fd1bfd8c 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -1147,6 +1147,15 @@ with the ``--name`` option. The :class:`template context
To work around this problem, you can use the :ttag:`templatetag`
templatetag to "escape" the various parts of the template syntax.
+ In addition, to allow Python template files that contain Django template
+ language syntax while also preventing packaging systems from trying to
+ byte-compile invalid ``*.py`` files, template files ending with ``.py-tpl``
+ will be renamed to ``.py``.
+
+ .. versionchanged:: 1.9.2
+
+ Renaming of ``.py-tpl`` to ``.py`` was added.
+
.. _source: https://github.com/django/django/tree/master/django/conf/app_template/
startproject <projectname> [destination]