* chore: Use codespell to fix typos in code. Second part of replacement of #4651 @rjsparks, I probably need to revert some things here, and I also still need to add that new migration - how do I do that? * Revert migrations * Migrate "Whitelisted" to "Allowlisted" * TEST_COVERAGE_MASTER_FILE -> TEST_COVERAGE_MAIN_FILE * Fix permissions * Add suggestions from @jennifer-richards
46 lines
2 KiB
HTML
46 lines
2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% load django_bootstrap5 %}
|
|
|
|
{% block content %}
|
|
<h1>Template: {{ template }}</h1>
|
|
|
|
<h2>Meta information</h2>
|
|
<dl>
|
|
<dt>Title</dt>
|
|
<dd>{{ template.title }}</dt>
|
|
<dt>Group</dt>
|
|
<dd>{{ template.group }}</dd>
|
|
<dt>Template type</dt>
|
|
<dd>{{ template.type.name }}
|
|
{% if template.type.slug == "rst" %}
|
|
<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>
|
|
<p class="help-block">You can do variable interpolation with $variable if the template allows any variable.</p>
|
|
{% endif %}
|
|
{% if template.type.slug == "django" %}
|
|
<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>
|
|
<p class="help-block">You can do variable interpolation with the current django markup {{variable}} if the template allows any variable.</p>
|
|
{% endif %}
|
|
{% if template.type.slug == "plain" %}
|
|
<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>
|
|
{% endif %}
|
|
</dd>
|
|
{% if template.variables %}
|
|
<dt>Variables allowed in this template</dt>
|
|
<dd>{{ template.variables|linebreaks }}</dd>
|
|
{% endif %}
|
|
</dl>
|
|
|
|
<h2>Edit template content</h2>
|
|
<form id="dbtemplate-edit" method="post">
|
|
{% csrf_token %}
|
|
|
|
{% bootstrap_form form %}
|
|
|
|
|
|
|
|
<button class="btn btn-primary" type="submit">Save changes</button>
|
|
|
|
|
|
</form>
|
|
{% endblock %} |