|
3 | 3 | {% load django_bootstrap5 %} |
4 | 4 |
|
5 | 5 | {% block content %} |
6 | | -<h1>Template: {{ template }}</h1> |
7 | | - |
8 | | -<h2>Meta information</h2> |
9 | | -<dl> |
10 | | - <dt>Title</dt> |
11 | | - <dd>{{ template.title }}</dt> |
12 | | - <dt>Group</dt> |
13 | | - <dd>{{ template.group }}</dd> |
14 | | - <dt>Template type</dt> |
15 | | - <dd>{{ template.type.name }} |
16 | | - {% if template.type.slug == "rst" %} |
17 | | - <p class="help-block">This template uses the syntax of reStructuredText. Get a quick reference at <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">http://docutils.sourceforge.net/docs/user/rst/quickref.html</a>.</p> |
18 | | - <p class="help-block">You can do variable interpolation with $varialbe if the template allows any variable.</p> |
19 | | - {% endif %} |
20 | | - {% if template.type.slug == "django" %} |
21 | | - <p class="help-block">This template uses the syntax of the default django template framework. Get more info at <a href="https://docs.djangoproject.com/en/dev/topics/templates/">https://docs.djangoproject.com/en/dev/topics/templates/</a>.</p> |
22 | | - <p class="help-block">You can do variable interpolation with the current django markup {{variable}} if the template allows any variable.</p> |
23 | | - {% endif %} |
24 | | - {% if template.type.slug == "plain" %} |
25 | | - <p class="help-block">This template uses plain text, so no markup is used. You can do variable interpolation with $variable if the template allows any variable.</p> |
26 | | - {% endif %} |
27 | | - </dd> |
28 | | - {% if template.variables %} |
29 | | - <dt>Variables allowed in this template</dt> |
30 | | - <dd>{{ template.variables|linebreaks }}</dd> |
31 | | - {% endif %} |
32 | | -</dl> |
33 | | - |
34 | | -<h2>Edit template content</h2> |
35 | | -<form id="dbtemplate-edit" role="form" method="post"> |
36 | | - {% csrf_token %} |
37 | | - |
38 | | - {% bootstrap_form form %} |
39 | | - |
40 | | - |
41 | | - |
42 | | - <button class="btn btn-default" type="submit">Save changes</button> |
43 | | - |
44 | | - |
45 | | -</form> |
| 6 | + <h1>Template: {{ template }}</h1> |
| 7 | + |
| 8 | + <h2>Meta information</h2> |
| 9 | + <dl> |
| 10 | + <dt>Title</dt> |
| 11 | + <dd>{{ template.title }}</dt> |
| 12 | + <dt>Group</dt> |
| 13 | + <dd>{{ template.group }}</dd> |
| 14 | + <dt>Template type</dt> |
| 15 | + <dd>{{ template.type.name }} |
| 16 | + {% if template.type.slug == "rst" %} |
| 17 | + <p class="help-block">This template uses the syntax of reStructuredText. Get a quick reference at <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">http://docutils.sourceforge.net/docs/user/rst/quickref.html</a>.</p> |
| 18 | + <p class="help-block">You can do variable interpolation with $varialbe if the template allows any variable.</p> |
| 19 | + {% endif %} |
| 20 | + {% if template.type.slug == "django" %} |
| 21 | + <p class="help-block">This template uses the syntax of the default django template framework. Get more info at <a href="https://docs.djangoproject.com/en/dev/topics/templates/">https://docs.djangoproject.com/en/dev/topics/templates/</a>.</p> |
| 22 | + <p class="help-block">You can do variable interpolation with the current django markup {{variable}} if the template allows any variable.</p> |
| 23 | + {% endif %} |
| 24 | + {% if template.type.slug == "plain" %} |
| 25 | + <p class="help-block">This template uses plain text, so no markup is used. You can do variable interpolation with $variable if the template allows any variable.</p> |
| 26 | + {% endif %} |
| 27 | + </dd> |
| 28 | + {% if template.variables %} |
| 29 | + <dt>Variables allowed in this template</dt> |
| 30 | + <dd>{{ template.variables|linebreaks }}</dd> |
| 31 | + {% endif %} |
| 32 | + </dl> |
| 33 | + |
| 34 | + <h2>Edit template content</h2> |
| 35 | + <form id="dbtemplate-edit" role="form" method="post"> |
| 36 | + {% csrf_token %} |
| 37 | + |
| 38 | + {% bootstrap_form form %} |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + <button class="btn btn-default" type="submit">Save changes</button> |
| 43 | + |
| 44 | + |
| 45 | + </form> |
46 | 46 | {% endblock content %} |
0 commit comments