Ticket #12650: 12650-r12947.diff
File 12650-r12947.diff, 4.0 KB (added by , 15 years ago) |
---|
-
django/contrib/admin/templates/admin/base.html
diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html
a b 1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE}}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>2 <html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE|default:"en-us" }}" xml:lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> 3 3 <head> 4 4 <title>{% block title %}{% endblock %}</title> 5 5 <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" /> -
django/contrib/databrowse/templates/databrowse/base.html
diff --git a/django/contrib/databrowse/templates/databrowse/base.html b/django/contrib/databrowse/templates/databrowse/base.html
a b 1 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE}}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>2 <html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE|default:"en-us" }}" xml:lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> 3 3 <head> 4 4 <title>{% block title %}{% endblock %}</title> 5 5 {% block style %} -
tests/regressiontests/admin_views/tests.py
diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py
a b 4 4 import datetime 5 5 from django.core.files import temp as tempfile 6 6 from django.test import TestCase 7 from django.conf import settings 7 8 from django.contrib.auth import admin # Register auth models with the admin. 8 9 from django.contrib.auth.models import User, Permission, UNUSABLE_PASSWORD 9 10 from django.contrib.contenttypes.models import ContentType … … 17 18 from django.utils.html import escape 18 19 from django.utils.translation import get_date_formats 19 20 from django.utils.encoding import iri_to_uri 21 import django.template.context 20 22 21 23 # local test models 22 24 from models import Article, BarAccount, CustomArticle, EmptyModel, \ … … 2039 2041 self.assert_('password' not in adminform.form.errors) 2040 2042 self.assertEquals(adminform.form.errors['password2'], 2041 2043 [u"The two password fields didn't match."]) 2044 2045 class ValidXHTMLTests(TestCase): 2046 fixtures = ['admin-views-users.xml'] 2047 urlbit = 'admin' 2048 2049 def setUp(self): 2050 self._context_processors = None 2051 self._use_i18n, settings.USE_I18N = settings.USE_I18N, False 2052 if 'django.core.context_processors.i18n' in settings.TEMPLATE_CONTEXT_PROCESSORS: 2053 self._context_processors = settings.TEMPLATE_CONTEXT_PROCESSORS 2054 cp = list(settings.TEMPLATE_CONTEXT_PROCESSORS) 2055 cp.remove('django.core.context_processors.i18n') 2056 settings.TEMPLATE_CONTEXT_PROCESSORS = tuple(cp) 2057 # Force re-evaluation of the contex processor list 2058 django.template.context._standard_context_processors = None 2059 self.client.login(username='super', password='secret') 2060 2061 def tearDown(self): 2062 self.client.logout() 2063 if self._context_processors is not None: 2064 settings.TEMPLATE_CONTEXT_PROCESSORS = self._context_processors 2065 # Force re-evaluation of the contex processor list 2066 django.template.context._standard_context_processors = None 2067 settings.USE_I18N = self._use_i18n 2068 2069 def testLangNamePresent(self): 2070 response = self.client.get('/test_admin/%s/admin_views/' % self.urlbit) 2071 self.failIf(' lang=""' in response.content) 2072 self.failIf(' xml:lang=""' in response.content)