diff options
| author | Author: Nick Pope <nick.pope@flightdataservices.com> | 2020-11-20 11:03:23 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-11-20 11:09:46 +0100 |
| commit | 20f2b822f8bc9138e39a2517371a7b4a98ca1ff5 (patch) | |
| tree | 14138bc0c39de8e933f33c0c61962e17934a8c71 | |
| parent | d10425f9c762b9ee58721e4e8006d8cb238e1386 (diff) | |
Added explicit HTMLElement.dir attribute in templates.
| -rw-r--r-- | django/contrib/admin/templates/admin/base.html | 2 | ||||
| -rw-r--r-- | django/contrib/gis/templates/gis/admin/openlayers.html | 2 | ||||
| -rw-r--r-- | django/views/templates/default_urlconf.html | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html index d86f138da5..e3788b9c20 100644 --- a/django/contrib/admin/templates/admin/base.html +++ b/django/contrib/admin/templates/admin/base.html @@ -1,6 +1,6 @@ {% load i18n static %}<!DOCTYPE html> {% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %} -<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> +<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" dir="{{ LANGUAGE_BIDI|yesno:'rtl,ltr,auto' }}"> <head> <title>{% block title %}{% endblock %}</title> <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}"> diff --git a/django/contrib/gis/templates/gis/admin/openlayers.html b/django/contrib/gis/templates/gis/admin/openlayers.html index 64eef66c12..6943a5beae 100644 --- a/django/contrib/gis/templates/gis/admin/openlayers.html +++ b/django/contrib/gis/templates/gis/admin/openlayers.html @@ -21,7 +21,7 @@ {% block openlayers %}{% include "gis/admin/openlayers.js" %}{% endblock %} //]]> </script> -<div id="{{ id }}_map"{% if LANGUAGE_BIDI %} dir="ltr"{% endif %}></div> +<div id="{{ id }}_map" dir="{{ LANGUAGE_BIDI|yesno:'rtl,ltr,auto' }}"></div> {% if editable %} <a href="javascript:{{ module }}.clearFeatures()">{% translate "Delete all Features" %}</a> {% endif %} diff --git a/django/views/templates/default_urlconf.html b/django/views/templates/default_urlconf.html index dc825cf8c2..e8e180f8bc 100644 --- a/django/views/templates/default_urlconf.html +++ b/django/views/templates/default_urlconf.html @@ -1,7 +1,7 @@ {% load i18n %} <!doctype html> {% get_current_language_bidi as LANGUAGE_BIDI %} -<html{% if LANGUAGE_BIDI %} dir="rtl"{% endif %}> +<html dir="{{ LANGUAGE_BIDI|yesno:'rtl,ltr,auto' }}"> <head> <meta charset="utf-8"> <title>{% translate "Django: the Web framework for perfectionists with deadlines." %}</title> |
