Skip to content

Commit 0cb6b63

Browse files
rpkilbytomchristie
authored andcommitted
Use 'url' template filter in docs (encode#6805)
1 parent 6499378 commit 0cb6b63

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs_theme/main.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta charset="utf-8">
77
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name }}</title>
88
<link href="{{ base_url }}/img/favicon.ico" rel="icon" type="image/x-icon">
9-
<link rel="canonical" href="{{ page.canonical_url }}" />
9+
<link rel="canonical" href="{{ page.canonical_url|url }}" />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1111
<meta name="description" content="Django, API, REST{% if page %}, {{ page.title }}{% endif %}">
1212
<meta name="author" content="Tom Christie">
@@ -91,12 +91,12 @@ <h3 id="myModalLabel">Documentation search</h3>
9191

9292
{% for toc_item in page.toc %}
9393
<li class="{% if page and not page.is_homepage %}main{% endif %}">
94-
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
94+
<a href="{{ toc_item.url|url }}">{{ toc_item.title }}</a>
9595
</li>
9696

9797
{% for toc_item in toc_item.children %}
9898
<li>
99-
<a href="{{ toc_item.url }}">{{ toc_item.title }}</a>
99+
<a href="{{ toc_item.url|url }}">{{ toc_item.title }}</a>
100100
</li>
101101
{% endfor %}
102102
{% endfor %}

docs_theme/nav.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<div class="navbar-inner">
33
<div class="container-fluid">
44
<a class="repo-link btn btn-primary btn-small" href="https://github.com/encode/django-rest-framework/tree/master">GitHub</a>
5-
<a class="repo-link btn btn-inverse btn-small {% if not page.next_page %}disabled{% endif %}" rel="next" {% if page.next_page %}href="{{ page.next_page.url }}"{% endif %}>
5+
<a class="repo-link btn btn-inverse btn-small {% if not page.next_page %}disabled{% endif %}" rel="next" {% if page.next_page %}href="{{ page.next_page.url|url }}"{% endif %}>
66
Next <i class="icon-arrow-right icon-white"></i>
77
</a>
8-
<a class="repo-link btn btn-inverse btn-small {% if not page.previous_page %}disabled{% endif %}" rel="prev" {% if page.previous_page %}href="{{ page.previous_page.url }}"{% endif %}>
8+
<a class="repo-link btn btn-inverse btn-small {% if not page.previous_page %}disabled{% endif %}" rel="prev" {% if page.previous_page %}href="{{ page.previous_page.url|url }}"{% endif %}>
99
<i class="icon-arrow-left icon-white"></i> Previous
1010
</a>
1111
<a id="search_modal_show" class="repo-link btn btn-inverse btn-small" href="#mkdocs_search_modal" data-toggle="modal" data-target="#mkdocs_search_modal"><i class="icon-search icon-white"></i> Search</a>
@@ -25,14 +25,14 @@
2525
<ul class="dropdown-menu">
2626
{% for nav_item in nav_item.children %}
2727
<li {% if nav_item.active %}class="active" {% endif %}>
28-
<a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
28+
<a href="{{ nav_item.url|url }}">{{ nav_item.title }}</a>
2929
</li>
3030
{% endfor %}
3131
</ul>
3232
</li>
3333
{% else %}
3434
<li {% if nav_item.active %}class="active" {% endif %}>
35-
<a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
35+
<a href="{{ nav_item.url|url }}">{{ nav_item.title }}</a>
3636
</li>
3737
{% endif %} {% endfor %}
3838

0 commit comments

Comments
 (0)