mirror of https://github.com/django/django.git
Fixed #14559 -- corrected some typos and misleading docstrings. Thanks to Gabriel Hurley for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4ba6348a00
commit
352deb0915
|
@ -41,7 +41,7 @@ class Signal(object):
|
||||||
A function or an instance method which is to receive signals.
|
A function or an instance method which is to receive signals.
|
||||||
Receivers must be hashable objects.
|
Receivers must be hashable objects.
|
||||||
|
|
||||||
if weak is True, then receiver must be weak-referencable (more
|
If weak is True, then receiver must be weak-referencable (more
|
||||||
precisely saferef.safeRef() must be able to create a reference
|
precisely saferef.safeRef() must be able to create a reference
|
||||||
to the receiver).
|
to the receiver).
|
||||||
|
|
||||||
|
@ -52,11 +52,11 @@ class Signal(object):
|
||||||
dispatch_uid.
|
dispatch_uid.
|
||||||
|
|
||||||
sender
|
sender
|
||||||
The sender to which the receiver should respond Must either be
|
The sender to which the receiver should respond. Must either be
|
||||||
of type Signal, or None to receive events from any sender.
|
of type Signal, or None to receive events from any sender.
|
||||||
|
|
||||||
weak
|
weak
|
||||||
Whether to use weak references to the receiver By default, the
|
Whether to use weak references to the receiver. By default, the
|
||||||
module will attempt to use weak references to the receiver
|
module will attempt to use weak references to the receiver
|
||||||
objects. If this parameter is false, then strong references will
|
objects. If this parameter is false, then strong references will
|
||||||
be used.
|
be used.
|
||||||
|
@ -170,7 +170,7 @@ class Signal(object):
|
||||||
Arguments:
|
Arguments:
|
||||||
|
|
||||||
sender
|
sender
|
||||||
The sender of the signal Can be any python object (normally one
|
The sender of the signal. Can be any python object (normally one
|
||||||
registered with a connect if you actually want something to
|
registered with a connect if you actually want something to
|
||||||
occur).
|
occur).
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ class Signal(object):
|
||||||
Return a list of tuple pairs [(receiver, response), ... ]. May raise
|
Return a list of tuple pairs [(receiver, response), ... ]. May raise
|
||||||
DispatcherKeyError.
|
DispatcherKeyError.
|
||||||
|
|
||||||
if any receiver raises an error (specifically any subclass of
|
If any receiver raises an error (specifically any subclass of
|
||||||
Exception), the error instance is returned as the result for that
|
Exception), the error instance is returned as the result for that
|
||||||
receiver.
|
receiver.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -90,7 +90,7 @@ class CommonMiddleware(object):
|
||||||
return http.HttpResponsePermanentRedirect(newurl)
|
return http.HttpResponsePermanentRedirect(newurl)
|
||||||
|
|
||||||
def process_response(self, request, response):
|
def process_response(self, request, response):
|
||||||
"Check for a flat page (for 404s) and calculate the Etag, if needed."
|
"Send broken link emails and calculate the Etag, if needed."
|
||||||
if response.status_code == 404:
|
if response.status_code == 404:
|
||||||
if settings.SEND_BROKEN_LINK_EMAILS:
|
if settings.SEND_BROKEN_LINK_EMAILS:
|
||||||
# If the referrer was from an internal link or a non-search-engine site,
|
# If the referrer was from an internal link or a non-search-engine site,
|
||||||
|
|
Loading…
Reference in New Issue