updated doc: ref/emails.rst and topics/downloader-middleware.rst

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40717
This commit is contained in:
Pablo Hoffman 2009-01-13 11:55:20 +00:00
parent 468bfeb278
commit e316722bb1
2 changed files with 13 additions and 4 deletions

View File

@ -52,7 +52,9 @@ uses `Twisted non-blocking IO`_, like the rest of the framework.
``body`` is a string with the body of the message
``attachs`` is a list of tuples containing (attach_name, mimetype, file_object) where:
``attachs`` is an iterable of tuples (attach_name, mimetype, file_object)
where:
``attach_name`` is a string with the name will appear on the emails attachment
``mimetype`` is the mimetype of the attachment
``file_object`` is a readable file object

View File

@ -50,9 +50,16 @@ If returns a Response object, Scrapy won't bother calling ANY other request or
exception middleware, or the appropriate download function; it'll return that
Response. Response middleware is always called on every response.
If returns a :class:`~scrapy.http.Request` object, returned request is used to
instruct a redirection. Redirection is handled inside middleware scope, and
original request don't finish until redirected request is completed.
If returns a :class:`~scrapy.http.Request` object, the returned request will be
re-scheduled (in the Scheduler) to be downloaded in the future. The callback of
the original request will always be called. If the new request has a callback
it will be called with the response downloaded, and the output of that callback
will then be passed to the original callback. If the new request doesn't have a
callback, the response downloaded will be just passed to the original request
callback.
If returns an :exception:`IgnoreRequest` exception, the entire request will be
dropped completely and its callback never called.
.. method:: process_response(request, response, spider)