Loaded cycle and firstof from future in built-in templates. Refs #17906.

This was missing from f49e9a517f.
This commit is contained in:
Aymeric Augustin 2013-02-24 15:16:45 +01:00
parent 99edbe0e27
commit bc787f6a32
6 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
{% load admin_static %}<!DOCTYPE html> {% load admin_static %}{% load firstof from future %}<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> <html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
<head> <head>
<title>{% block title %}{% endblock %}</title> <title>{% block title %}{% endblock %}</title>
@ -26,7 +26,7 @@
{% if user.is_active and user.is_staff %} {% if user.is_active and user.is_staff %}
<div id="user-tools"> <div id="user-tools">
{% trans 'Welcome,' %} {% trans 'Welcome,' %}
<strong>{% filter force_escape %}{% firstof user.get_short_name user.get_username %}{% endfilter %}</strong>. <strong>{% firstof user.get_short_name user.get_username %}</strong>.
{% block userlinks %} {% block userlinks %}
{% url 'django-admindocs-docroot' as docsroot %} {% url 'django-admindocs-docroot' as docsroot %}
{% if docsroot %} {% if docsroot %}

View File

@ -1,4 +1,4 @@
{% load i18n admin_static %} {% load i18n admin_static %}{% load cycle from future %}
{% if result_hidden_fields %} {% if result_hidden_fields %}
<div class="hiddenfields">{# DIV for HTML validation #} <div class="hiddenfields">{# DIV for HTML validation #}
{% for item in result_hidden_fields %}{{ item }}{% endfor %} {% for item in result_hidden_fields %}{{ item }}{% endfor %}

View File

@ -1,4 +1,4 @@
{% load i18n admin_static admin_modify %} {% load i18n admin_static admin_modify %}{% load cycle from future %}
<div class="inline-group" id="{{ inline_admin_formset.formset.prefix }}-group"> <div class="inline-group" id="{{ inline_admin_formset.formset.prefix }}-group">
<div class="tabular inline-related {% if forloop.last %}last-related{% endif %}"> <div class="tabular inline-related {% if forloop.last %}last-related{% endif %}">
{{ inline_admin_formset.formset.management_form }} {{ inline_admin_formset.formset.management_form }}

View File

@ -1,5 +1,5 @@
{% extends "admin/base_site.html" %} {% extends "admin/base_site.html" %}
{% load i18n %} {% load i18n %}{% load firstof from future %}
{% block coltype %}colSM{% endblock %} {% block coltype %}colSM{% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}

View File

@ -1,5 +1,5 @@
{% extends "admin/base_site.html" %} {% extends "admin/base_site.html" %}
{% load i18n %} {% load i18n %}{% load firstof from future %}
{% block coltype %}colSM{% endblock %} {% block coltype %}colSM{% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}

View File

@ -926,7 +926,7 @@ Exception Value: {{ exception_value|force_escape }}
</html> </html>
""" """
TECHNICAL_500_TEXT_TEMPLATE = """{% firstof exception_type 'Report' %}{% if request %} at {{ request.path_info }}{% endif %} TECHNICAL_500_TEXT_TEMPLATE = """{% load firstof from future %}{% firstof exception_type 'Report' %}{% if request %} at {{ request.path_info }}{% endif %}
{% firstof exception_value 'No exception supplied' %} {% firstof exception_value 'No exception supplied' %}
{% if request %} {% if request %}
Request Method: {{ request.META.REQUEST_METHOD }} Request Method: {{ request.META.REQUEST_METHOD }}