Skip to content

Commit b61af89

Browse files
committed
Add compatibility for the cycle tag.
1 parent 56d3118 commit b61af89

File tree

15 files changed

+26
-13
lines changed

15 files changed

+26
-13
lines changed

debug_toolbar/templates/debug_toolbar/panels/cache.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}
22
<h4>{% trans "Summary" %}</h4>
33
<table>
44
<thead>

debug_toolbar/templates/debug_toolbar/panels/headers.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}
22

33
<h4>{% trans "Request headers" %}</h4>
44

debug_toolbar/templates/debug_toolbar/panels/logging.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}
22
{% if records %}
33
<table>
44
<thead>

debug_toolbar/templates/debug_toolbar/panels/request.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}
22

33
<h4>{% trans "View information" %}</h4>
44
<table>

debug_toolbar/templates/debug_toolbar/panels/settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}
22
<table>
33
<thead>
44
<tr>

debug_toolbar/templates/debug_toolbar/panels/signals.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}
22
<table>
33
<thead>
44
<tr>

debug_toolbar/templates/debug_toolbar/panels/sql.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n l10n %}{% load cycle from future %}{% load static from staticfiles %}
1+
{% load i18n l10n %}{% load cycle from debug_toolbar_compat %}{% load static from staticfiles %}
22
<div class="djdt-clearfix">
33
<ul class="djdt-stats">
44
{% for alias, info in databases %}

debug_toolbar/templates/debug_toolbar/panels/sql_explain.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}{% load static from staticfiles %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}{% load static from staticfiles %}
22
<div class="djDebugPanelTitle">
33
<a class="djDebugClose djDebugBack" href=""></a>
44
<h3>{% trans "SQL explained" %}</h3>

debug_toolbar/templates/debug_toolbar/panels/sql_profile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}{% load static from staticfiles %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}{% load static from staticfiles %}
22
<div class="djDebugPanelTitle">
33
<a class="djDebugClose djDebugBack" href=""></a>
44
<h3>{% trans "SQL profiled" %}</h3>

debug_toolbar/templates/debug_toolbar/panels/sql_select.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}{% load static from staticfiles %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}{% load static from staticfiles %}
22
<div class="djDebugPanelTitle">
33
<a class="djDebugClose djDebugBack" href=""></a>
44
<h3>{% trans "SQL selected" %}</h3>

debug_toolbar/templates/debug_toolbar/panels/staticfiles.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}{% load static from staticfiles%}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}{% load static from staticfiles%}
22

33
<h4>{% blocktrans count staticfiles_dirs|length as dirs_count %}Static file path{% plural %}Static file paths{% endblocktrans %}</h4>
44
{% if staticfiles_dirs %}

debug_toolbar/templates/debug_toolbar/panels/timer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}{% load static from staticfiles %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}{% load static from staticfiles %}
22
<h4>{% trans "Resource usage" %}</h4>
33
<table>
44
<colgroup>

debug_toolbar/templates/debug_toolbar/panels/versions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load cycle from future %}
1+
{% load i18n %}{% load cycle from debug_toolbar_compat %}
22
<table>
33
<thead>
44
<tr>

debug_toolbar/templatetags/__init__.py

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import django
2+
from django.template import Library
3+
4+
if django.VERSION >= (1, 8):
5+
from django.template.defaulttags import cycle
6+
else:
7+
from django.templatetags.future import cycle
8+
9+
10+
register = Library()
11+
12+
13+
cycle = register.tag(cycle)

0 commit comments

Comments
 (0)