mirror of
https://github.com/django/django.git
synced 2024-11-24 20:07:01 +01:00
Added missing lang attributes to html elements in docs.
This commit is contained in:
parent
a8f8b5a477
commit
97a6a678c4
@ -309,7 +309,7 @@ Here's what the "base.html" template, including the use of :doc:`static files
|
||||
:caption: ``templates/base.html``
|
||||
|
||||
{% load static %}
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
</head>
|
||||
|
@ -256,7 +256,7 @@ Here's a sample :file:`flatpages/default.html` template:
|
||||
.. code-block:: html+django
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{ flatpage.title }}</title>
|
||||
</head>
|
||||
|
@ -23,7 +23,7 @@ Here's a view that returns the current date and time, as an HTML document::
|
||||
|
||||
def current_datetime(request):
|
||||
now = datetime.datetime.now()
|
||||
html = "<html><body>It is now %s.</body></html>" % now
|
||||
html = '<html lang="en"><body>It is now %s.</body></html>' % now
|
||||
return HttpResponse(html)
|
||||
|
||||
Let's step through this code one line at a time:
|
||||
@ -225,7 +225,7 @@ Here's an example of an async view::
|
||||
|
||||
async def current_datetime(request):
|
||||
now = datetime.datetime.now()
|
||||
html = "<html><body>It is now %s.</body></html>" % now
|
||||
html = '<html lang="en"><body>It is now %s.</body></html>' % now
|
||||
return HttpResponse(html)
|
||||
|
||||
You can read more about Django's async support, and how to best use async
|
||||
|
Loading…
Reference in New Issue
Block a user