diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2011-04-20 17:40:53 +0000 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2011-04-20 17:40:53 +0000 |
| commit | 26cda43012104cf700673966659f8c2f2bfb0bbe (patch) | |
| tree | 6b37d7cd440f4f1cde5a4c79ace017d0859cb2e7 | |
| parent | 519534bf03fc50d9176a857e3f4de5cfe1d0fa66 (diff) | |
Switched to HTML5 doctype in all Django supplied templates.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16050 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/admin/templates/admin/base.html | 4 | ||||
| -rw-r--r-- | django/contrib/comments/templates/comments/400-debug.html | 4 | ||||
| -rw-r--r-- | django/contrib/comments/templates/comments/base.html | 4 | ||||
| -rw-r--r-- | django/contrib/databrowse/templates/databrowse/base.html | 4 | ||||
| -rw-r--r-- | django/contrib/flatpages/tests/templates/flatpages/default.html | 3 | ||||
| -rw-r--r-- | django/views/csrf.py | 2 | ||||
| -rw-r--r-- | django/views/debug.py | 6 | ||||
| -rw-r--r-- | django/views/static.py | 4 | ||||
| -rw-r--r-- | docs/ref/contrib/flatpages.txt | 3 | ||||
| -rw-r--r-- | docs/topics/templates.txt | 10 | ||||
| -rw-r--r-- | docs/topics/testing.txt | 2 |
11 files changed, 21 insertions, 25 deletions
diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html index cc1f22c4c3..d0f8e52753 100644 --- a/django/contrib/admin/templates/admin/base.html +++ b/django/contrib/admin/templates/admin/base.html @@ -1,5 +1,5 @@ -{% load url from future %}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<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 %}> +{% load url from future %}<!DOCTYPE html> +<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> <head> <title>{% block title %}{% endblock %}</title> <link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" /> diff --git a/django/contrib/comments/templates/comments/400-debug.html b/django/contrib/comments/templates/comments/400-debug.html index 7fd20416be..0d2efaff5a 100644 --- a/django/contrib/comments/templates/comments/400-debug.html +++ b/django/contrib/comments/templates/comments/400-debug.html @@ -1,5 +1,5 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> +<!DOCTYPE html> +<html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Comment post not allowed (400)</title> diff --git a/django/contrib/comments/templates/comments/base.html b/django/contrib/comments/templates/comments/base.html index c8b9517490..9828ff64d0 100644 --- a/django/contrib/comments/templates/comments/base.html +++ b/django/contrib/comments/templates/comments/base.html @@ -1,5 +1,5 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> +<!DOCTYPE html> +<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>{% block title %}{% endblock %}</title> diff --git a/django/contrib/databrowse/templates/databrowse/base.html b/django/contrib/databrowse/templates/databrowse/base.html index 33cac48601..56464e0614 100644 --- a/django/contrib/databrowse/templates/databrowse/base.html +++ b/django/contrib/databrowse/templates/databrowse/base.html @@ -1,5 +1,5 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<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 %}> +<!DOCTYPE html> +<html lang="{{ LANGUAGE_CODE|default:"en-us" }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}> <head> <title>{% block title %}{% endblock %}</title> {% block style %} diff --git a/django/contrib/flatpages/tests/templates/flatpages/default.html b/django/contrib/flatpages/tests/templates/flatpages/default.html index 1410e17adf..559e3f710f 100644 --- a/django/contrib/flatpages/tests/templates/flatpages/default.html +++ b/django/contrib/flatpages/tests/templates/flatpages/default.html @@ -1,5 +1,4 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" - "http://www.w3.org/TR/REC-html40/loose.dtd"> +<!DOCTYPE html> <html> <head> <title>{{ flatpage.title }}</title> diff --git a/django/views/csrf.py b/django/views/csrf.py index b590dd1213..038b0b7020 100644 --- a/django/views/csrf.py +++ b/django/views/csrf.py @@ -7,7 +7,7 @@ from django.conf import settings # other way of making it available independent of what is in the settings file. CSRF_FAILRE_TEMPLATE = """ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> diff --git a/django/views/debug.py b/django/views/debug.py index 38a32a889f..ad8a68ff49 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -304,7 +304,7 @@ def empty_urlconf(request): # TECHNICAL_500_TEMPLATE = """ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE HTML> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> @@ -763,7 +763,7 @@ Exception Value: {{ exception_value|force_escape }} """ TECHNICAL_404_TEMPLATE = """ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> @@ -835,7 +835,7 @@ TECHNICAL_404_TEMPLATE = """ """ EMPTY_URLCONF_TEMPLATE = """ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<!DOCTYPE html> <html lang="en"><head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="robots" content="NONE,NOARCHIVE"><title>Welcome to Django</title> diff --git a/django/views/static.py b/django/views/static.py index 0caef8c9d3..72eb1a7f75 100644 --- a/django/views/static.py +++ b/django/views/static.py @@ -67,8 +67,8 @@ def serve(request, path, document_root=None, show_indexes=False): DEFAULT_DIRECTORY_INDEX_TEMPLATE = """ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<!DOCTYPE html> +<html lang="en"> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="en-us" /> diff --git a/docs/ref/contrib/flatpages.txt b/docs/ref/contrib/flatpages.txt index a99f75eb2d..c01130067b 100644 --- a/docs/ref/contrib/flatpages.txt +++ b/docs/ref/contrib/flatpages.txt @@ -170,8 +170,7 @@ Here's a sample :file:`flatpages/default.html` template: .. code-block:: html+django - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" - "http://www.w3.org/TR/REC-html40/loose.dtd"> + <!DOCTYPE html> <html> <head> <title>{{ flatpage.title }}</title> diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt index 3b641fb58e..3f56c9ea01 100644 --- a/docs/topics/templates.txt +++ b/docs/topics/templates.txt @@ -259,9 +259,8 @@ defines **blocks** that child templates can override. It's easiest to understand template inheritance by starting with an example:: - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <!DOCTYPE html> + <html lang="en"> <head> <link rel="stylesheet" href="style.css" /> <title>{% block title %}My amazing site{% endblock %}</title> @@ -313,9 +312,8 @@ in ``base.html`` and replace those blocks with the contents of the child template. Depending on the value of ``blog_entries``, the output might look like:: - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <!DOCTYPE html> + <html lang="en"> <head> <link rel="stylesheet" href="style.css" /> <title>My amazing blog</title> diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index 64e4707350..fb9f6e53b9 100644 --- a/docs/topics/testing.txt +++ b/docs/topics/testing.txt @@ -615,7 +615,7 @@ Web pages:: 200 >>> response = c.get('/customer/details/') >>> response.content - '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...' + '<!DOCTYPE html...' As this example suggests, you can instantiate ``Client`` from within a session of the Python interactive interpreter. |
