2010-07-24 18:21:21 +08:00
|
|
|
{% extends "basic/layout.html" %}
|
2008-08-24 06:25:40 +08:00
|
|
|
|
2009-07-03 13:40:46 +08:00
|
|
|
{%- macro secondnav() %}
|
2008-08-24 06:25:40 +08:00
|
|
|
{%- if prev %}
|
2013-10-11 04:42:30 +08:00
|
|
|
« <a href="{{ prev.link|e }}" title="{{ prev.title|e }}">previous</a>
|
2008-08-24 06:25:40 +08:00
|
|
|
{{ reldelim2 }}
|
|
|
|
{%- endif %}
|
|
|
|
{%- if parents %}
|
2013-10-11 04:42:30 +08:00
|
|
|
<a href="{{ parents.0.link|e }}" title="{{ parents.0.title|e }}" accesskey="U">up</a>
|
2008-08-24 06:25:40 +08:00
|
|
|
{%- else %}
|
2013-10-11 04:42:30 +08:00
|
|
|
<a title="{{ docstitle }}" href="{{ pathto('index') }}" accesskey="U">up</a>
|
2008-08-24 06:25:40 +08:00
|
|
|
{%- endif %}
|
|
|
|
{%- if next %}
|
|
|
|
{{ reldelim2 }}
|
|
|
|
<a href="{{ next.link|e }}" title="{{ next.title|e }}">next</a> »
|
|
|
|
{%- endif %}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
2010-05-08 22:31:20 +08:00
|
|
|
{% block extrahead %}
|
2014-03-02 23:00:30 +08:00
|
|
|
{# When building htmlhelp (CHM format) disable jQuery inclusion, #}
|
|
|
|
{# as it causes problems in compiled CHM files. #}
|
2013-12-04 23:46:56 +08:00
|
|
|
{% if builder != "htmlhelp" %}
|
2010-05-08 22:31:20 +08:00
|
|
|
{{ super() }}
|
2019-12-11 16:49:54 +08:00
|
|
|
<script src="{{ pathto('templatebuiltins.js', 1) }}"></script>
|
|
|
|
<script>
|
2010-05-08 22:31:20 +08:00
|
|
|
(function($) {
|
|
|
|
if (!django_template_builtins) {
|
|
|
|
// templatebuiltins.js missing, do nothing.
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
|
|
// Hyperlink Django template tags and filters
|
|
|
|
var base = "{{ pathto('ref/templates/builtins') }}";
|
|
|
|
if (base == "#") {
|
|
|
|
// Special case for builtins.html itself
|
|
|
|
base = "";
|
|
|
|
}
|
|
|
|
// Tags are keywords, class '.k'
|
|
|
|
$("div.highlight\\-html\\+django span.k").each(function(i, elem) {
|
|
|
|
var tagname = $(elem).text();
|
|
|
|
if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
|
|
|
|
var fragment = tagname.replace(/_/, '-');
|
|
|
|
$(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// Filters are functions, class '.nf'
|
|
|
|
$("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
|
|
|
|
var filtername = $(elem).text();
|
|
|
|
if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
|
|
|
|
var fragment = filtername.replace(/_/, '-');
|
|
|
|
$(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})(jQuery);
|
2018-01-21 01:38:48 +08:00
|
|
|
{%- if include_console_assets -%}
|
|
|
|
(function($) {
|
|
|
|
$(document).ready(function() {
|
|
|
|
$(".c-tab-unix").on("click", function() {
|
|
|
|
$("section.c-content-unix").show();
|
|
|
|
$("section.c-content-win").hide();
|
|
|
|
$(".c-tab-unix").prop("checked", true);
|
|
|
|
});
|
|
|
|
$(".c-tab-win").on("click", function() {
|
|
|
|
$("section.c-content-win").show();
|
|
|
|
$("section.c-content-unix").hide();
|
|
|
|
$(".c-tab-win").prop("checked", true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})(jQuery);
|
|
|
|
{%- endif -%}
|
2010-05-08 22:31:20 +08:00
|
|
|
</script>
|
2013-12-04 23:46:56 +08:00
|
|
|
{% endif %}
|
2018-01-21 01:38:48 +08:00
|
|
|
{%- if include_console_assets -%}
|
2022-01-21 22:46:37 +08:00
|
|
|
<link rel="stylesheet" href="{{ pathto('_static/console-tabs.css', 1) }}">
|
2018-01-21 01:38:48 +08:00
|
|
|
{%- endif -%}
|
2010-05-08 22:31:20 +08:00
|
|
|
{% endblock %}
|
|
|
|
|
2008-08-24 06:25:40 +08:00
|
|
|
{% block document %}
|
|
|
|
<div id="custom-doc" class="{% block bodyclass %}{{ 'yui-t6' if pagename != 'index' else '' }}{% endblock %}">
|
|
|
|
<div id="hd">
|
|
|
|
<h1><a href="{{ pathto('index') }}">{{ docstitle }}</a></h1>
|
|
|
|
<div id="global-nav">
|
|
|
|
<a title="Home page" href="{{ pathto('index') }}">Home</a> {{ reldelim2 }}
|
|
|
|
<a title="Table of contents" href="{{ pathto('contents') }}">Table of contents</a> {{ reldelim2 }}
|
|
|
|
<a title="Global index" href="{{ pathto('genindex') }}">Index</a> {{ reldelim2 }}
|
2010-07-24 18:21:21 +08:00
|
|
|
<a title="Module index" href="{{ pathto('py-modindex') }}">Modules</a>
|
2008-08-24 06:25:40 +08:00
|
|
|
</div>
|
|
|
|
<div class="nav">{{ secondnav() }}</div>
|
|
|
|
</div>
|
2013-10-11 04:42:30 +08:00
|
|
|
|
2008-08-24 06:25:40 +08:00
|
|
|
<div id="bd">
|
|
|
|
<div id="yui-main">
|
|
|
|
<div class="yui-b">
|
|
|
|
<div class="yui-g" id="{{ pagename|replace('/', '-') }}">
|
|
|
|
{% block body %}{% endblock %}
|
2013-10-11 04:42:30 +08:00
|
|
|
</div>
|
2008-08-24 06:25:40 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% block sidebarwrapper %}
|
|
|
|
{% if pagename != 'index' %}
|
|
|
|
<div class="yui-b" id="sidebar">
|
|
|
|
{{ sidebar() }}
|
|
|
|
{%- if last_updated %}
|
|
|
|
<h3>Last update:</h3>
|
|
|
|
<p class="topless">{{ last_updated }}</p>
|
|
|
|
{%- endif %}
|
2013-10-11 04:42:30 +08:00
|
|
|
</div>
|
2008-08-24 06:25:40 +08:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
|
|
|
</div>
|
2013-10-11 04:42:30 +08:00
|
|
|
|
2008-08-24 06:25:40 +08:00
|
|
|
<div id="ft">
|
|
|
|
<div class="nav">{{ secondnav() }}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block sidebarrel %}
|
|
|
|
<h3>Browse</h3>
|
|
|
|
<ul>
|
|
|
|
{% if prev %}
|
|
|
|
<li>Prev: <a href="{{ prev.link }}">{{ prev.title }}</a></li>
|
|
|
|
{% endif %}
|
|
|
|
{% if next %}
|
|
|
|
<li>Next: <a href="{{ next.link }}">{{ next.title }}</a></li>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
<h3>You are here:</h3>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<a href="{{ pathto('index') }}">{{ docstitle }}</a>
|
|
|
|
{% for p in parents %}
|
|
|
|
<ul><li><a href="{{ p.link }}">{{ p.title }}</a>
|
|
|
|
{% endfor %}
|
|
|
|
<ul><li>{{ title }}</li></ul>
|
|
|
|
{% for p in parents %}</li></ul>{% endfor %}
|
|
|
|
</li>
|
2013-10-11 04:42:30 +08:00
|
|
|
</ul>
|
2008-08-24 06:25:40 +08:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{# Empty some default blocks out #}
|
|
|
|
{% block relbar1 %}{% endblock %}
|
|
|
|
{% block relbar2 %}{% endblock %}
|
|
|
|
{% block sidebar1 %}{% endblock %}
|
|
|
|
{% block sidebar2 %}{% endblock %}
|
2014-04-17 03:35:16 +08:00
|
|
|
{% block footer %}{% endblock %}
|