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
This commit is contained in:
Andrew Godwin 2013-08-09 14:17:30 +01:00
commit de64c4d6e9
489 changed files with 3840 additions and 1593 deletions

View file

@ -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 —

View file

@ -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

View file

@ -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:

View file

@ -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'