~cjwatson/lazr.restful/double-closing-brace

« back to all changes in this revision

Viewing changes to src/lazr/restful/tales.py

  • Committer: Colin Watson
  • Date: 2016-02-17 01:07:21 UTC
  • Revision ID: cjwatson@canonical.com-20160217010721-4d5fqqml5q97ss59
Switch zope.interface, zope.component, and lazr.delegates users from class advice to class decorators.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from docutils.core import Publisher
22
22
 
23
23
from zope.component import (
24
 
    adapts, getGlobalSiteManager, getUtility, queryMultiAdapter)
25
 
from zope.interface import implements
 
24
    adapter, getGlobalSiteManager, getUtility, queryMultiAdapter)
 
25
from zope.interface import implementer
26
26
from zope.interface.interfaces import IInterface
27
27
from zope.schema import getFields
28
28
from zope.schema.interfaces import (
141
141
    return WADL_DOC_TEMPLATE % parsed.to_html(WadlDocstringLinker())
142
142
 
143
143
 
 
144
@implementer(IPathAdapter)
 
145
@adapter(IBrowserRequest)
144
146
class WebServiceRequestAPI:
145
147
    """Namespace for web service functions related to a website request."""
146
 
    implements(IPathAdapter)
147
 
    adapts(IBrowserRequest)
148
148
 
149
149
    def __init__(self, request):
150
150
        """Initialize with respect to a request."""