Skip to content

Commit 1f0058a

Browse files
committed
In templates, load "static" templatetag instead of "staticfiles"
Since Django 1.10, it is preferable to load the static templatetag. If in INSTALLED_APPS, the templatetag will use django.contrib.staticfiles to determine static paths. For additional details, see: https://docs.djangoproject.com/en/dev/releases/1.10/#django-contrib-staticfiles > The static template tag now uses django.contrib.staticfiles if it’s in > INSTALLED_APPS. This is especially useful for third-party apps which > can now always use {% load static %} (instead of {% load staticfiles > %} or {% load static from staticfiles %}) and not worry about whether > or not the staticfiles app is installed. The staticfiles templatetag will be deprecated and removed in a future Django version.
1 parent 9964a20 commit 1f0058a

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

debug_toolbar/templates/debug_toolbar/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load static from staticfiles %}
1+
{% load i18n %}{% load static %}
22
<link rel="stylesheet" href="{% static 'debug_toolbar/css/print.css' %}" type="text/css" media="print" />
33
<link rel="stylesheet" href="{% static 'debug_toolbar/css/toolbar.css' %}" type="text/css" />
44
{% if toolbar.config.JQUERY_URL %}

debug_toolbar/templates/debug_toolbar/panels/profiling.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load static from staticfiles %}
1+
{% load i18n %}{% load static %}
22
<table width="100%">
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 static from staticfiles %}
1+
{% load i18n l10n %}{% load static %}
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 static from staticfiles %}
1+
{% load i18n %}{% load static %}
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 static from staticfiles %}
1+
{% load i18n %}{% load static %}
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 static from staticfiles %}
1+
{% load i18n %}{% load static %}
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 static from staticfiles%}
1+
{% load i18n %}
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/templates.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load i18n %}{% load static from staticfiles %}
1+
{% load i18n %}{% load static %}
22
<h4>{% blocktrans count template_dirs|length as template_count %}Template path{% plural %}Template paths{% endblocktrans %}</h4>
33
{% if template_dirs %}
44
<ol>

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 static from staticfiles %}
1+
{% load i18n %}{% load static %}
22
<h4>{% trans "Resource usage" %}</h4>
33
<table>
44
<colgroup>

0 commit comments

Comments
 (0)