[Zope3-checkins]
SVN: Zope3/branches/jim-adapter/src/zope/publisher/
Make adapters easier to register by adding adapts() declaration
Philipp von Weitershausen
philikon at philikon.de
Wed Apr 19 12:01:18 EDT 2006
Log message for revision 67138:
Make adapters easier to register by adding adapts() declaration
Changed:
U Zope3/branches/jim-adapter/src/zope/publisher/browser.py
U Zope3/branches/jim-adapter/src/zope/publisher/http.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/publisher/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/publisher/browser.py 2006-04-19 15:52:55 UTC (rev 67137)
+++ Zope3/branches/jim-adapter/src/zope/publisher/browser.py 2006-04-19 16:01:17 UTC (rev 67138)
@@ -39,6 +39,7 @@
from zope.publisher.interfaces.browser import IBrowserView
from zope.publisher.interfaces.browser import IBrowserPage
from zope.publisher.interfaces.browser import IBrowserSkinType
+from zope.publisher.interfaces.http import IHTTPRequest
from zope.publisher.http import HTTPRequest, HTTPResponse
__ArrayTypes = (ListType, TupleType)
@@ -782,7 +783,7 @@
return lang
class BrowserLanguages(object):
-
+ zope.component.adapts(IHTTPRequest)
implements(IUserPreferredLanguages)
def __init__(self, request):
Modified: Zope3/branches/jim-adapter/src/zope/publisher/http.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/publisher/http.py 2006-04-19 15:52:55 UTC (rev 67137)
+++ Zope3/branches/jim-adapter/src/zope/publisher/http.py 2006-04-19 16:01:17 UTC (rev 67138)
@@ -26,7 +26,6 @@
from tempfile import TemporaryFile
from zope import component, interface
-
from zope.deprecation import deprecation
from zope.publisher import contenttype
@@ -974,6 +973,7 @@
class HTTPCharsets(object):
+ component.adapts(IHTTPRequest)
interface.implements(IUserPreferredCharsets)
def __init__(self, request):
More information about the Zope3-Checkins
mailing list