summaryrefslogtreecommitdiff
path: root/docs/topics/http
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-08-09 14:17:30 +0100
committerAndrew Godwin <andrew@aeracode.org>2013-08-09 14:17:30 +0100
commitde64c4d6e97c980fb4c0ace045fc4070b3f763d9 (patch)
tree045c8af6a88fa964cf7e284970a6e93d53941a79 /docs/topics/http
parentfddc5957c53bd654312c4a238a8cdcfe5f4ef4cc (diff)
parentb575d690bbc1c4cd7f575346132c09fca8c736a7 (diff)
Merge remote-tracking branch 'core/master' into schema-alteration
Conflicts: django/core/management/commands/flush.py django/core/management/commands/syncdb.py django/db/models/loading.py docs/internals/deprecation.txt docs/ref/django-admin.txt docs/releases/1.7.txt
Diffstat (limited to 'docs/topics/http')
-rw-r--r--docs/topics/http/middleware.txt3
-rw-r--r--docs/topics/http/sessions.txt2
-rw-r--r--docs/topics/http/urls.txt4
-rw-r--r--docs/topics/http/views.txt14
4 files changed, 12 insertions, 11 deletions
diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt
index 503d4322e0..6bb7ccb8f8 100644
--- a/docs/topics/http/middleware.txt
+++ b/docs/topics/http/middleware.txt
@@ -28,11 +28,12 @@ here's the default value created by :djadmin:`django-admin.py startproject
<startproject>`::
MIDDLEWARE_CLASSES = (
- 'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
A Django installation doesn't require any middleware —
diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt
index 0b818c4f5d..3ee7af9539 100644
--- a/docs/topics/http/sessions.txt
+++ b/docs/topics/http/sessions.txt
@@ -293,7 +293,7 @@ You can edit it multiple times.
expiration (or those set to expire at browser close), this will equal the
date :setting:`SESSION_COOKIE_AGE` seconds from now.
- This function accepts the same keyword argumets as :meth:`get_expiry_age`.
+ This function accepts the same keyword arguments as :meth:`get_expiry_age`.
.. method:: get_expire_at_browser_close
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt
index 8a3f240307..83610e99c0 100644
--- a/docs/topics/http/urls.txt
+++ b/docs/topics/http/urls.txt
@@ -412,7 +412,7 @@ For example::
)
In this example, for a request to ``/blog/2005/``, Django will call
-``blog.views.year_archive(year='2005', foo='bar')``.
+``blog.views.year_archive(request, year='2005', foo='bar')``.
This technique is used in the
:doc:`syndication framework </ref/contrib/syndication>` to pass metadata and
@@ -623,7 +623,7 @@ change the entry in the URLconf.
In some scenarios where views are of a generic nature, a many-to-one
relationship might exist between URLs and views. For these cases the view name
-isn't a good enough identificator for it when it comes the time of reversing
+isn't a good enough identifier for it when comes the time of reversing
URLs. Read the next section to know about the solution Django provides for this.
.. _naming-url-patterns:
diff --git a/docs/topics/http/views.txt b/docs/topics/http/views.txt
index 5c27c9c958..ebe5302ef8 100644
--- a/docs/topics/http/views.txt
+++ b/docs/topics/http/views.txt
@@ -140,18 +140,18 @@ The 404 (page not found) view
.. function:: django.views.defaults.page_not_found(request, template_name='404.html')
-When you raise an ``Http404`` exception, Django loads a special view devoted
-to handling 404 errors. By default, it's the view
-``django.views.defaults.page_not_found``, which either produces a very simple
-"Not Found" message or loads and renders the template ``404.html`` if you
-created it in your root template directory.
+When you raise :exc:`~django.http.Http404` from within a view, Django loads a
+special view devoted to handling 404 errors. By default, it's the view
+:func:`django.views.defaults.page_not_found`, which either produces a very
+simple "Not Found" message or loads and renders the template ``404.html`` if
+you created it in your root template directory.
The default 404 view will pass one variable to the template: ``request_path``,
which is the URL that resulted in the error.
The ``page_not_found`` view should suffice for 99% of Web applications, but if
-you want to override it, you can specify ``handler404`` in your URLconf, like
-so::
+you want to override it, you can specify ``handler404`` in your root URLconf
+(setting ``handler404`` anywhere else will have no effect), like so::
handler404 = 'mysite.views.my_custom_404_view'