Hi Leonard,
This branch looks good. I have some very minor comments below.
merge-approved
-Edwin
>=== added file 'src/lazr/restful/docs/multiversion.txt' >+ >>> from lazr.restful.simple import TraverseWithGet >+ >>> from zope.publisher.interfaces.browser import IBrowserRequest >+ >>> class ContactSet(TraverseWithGet): >+ ... implements(IContactSet) >+ ... path = "contact"
Please fix the path variable as discussed on IRC.
>+ ... >+ ... def __init__(self): >+ ... self.contacts = CONTACTS >+ ... >+ ... def get(self, name): >+ ... contacts = [contact for contacts in self.contacts >+ ... if pair.name == name] >+ ... if len(contacts) == 1: >+ ... return contacts[0] >+ ... return None >+ >>> sm.registerAdapter(TraverseWithGet, [ITestDataObject, IBrowserRequest])
Line too long.
>=== modified file 'src/lazr/restful/docs/webservice.txt' >@@ -417,16 +406,15 @@ > ... def getAllAuthors(self): > ... return self.authors > ... >- ... def get(self, name): >+ ... def get(self, request, name): > ... match = [p for p in self.authors if p.name == name] > ... if len(match) > 0: > ... return match[0] > ... return None > >+ >>> sm.registerAdapter(TraverseWithGet, [ITestDataObject, IBrowserRequest])
« Back to merge proposal
Hi Leonard,
This branch looks good. I have some very minor comments below.
merge-approved
-Edwin
>=== added file 'src/lazr/ restful/ docs/multiversi on.txt' interfaces. browser import IBrowserRequest TraverseWithGet ): IContactSet)
>+ >>> from lazr.restful.simple import TraverseWithGet
>+ >>> from zope.publisher.
>+ >>> class ContactSet(
>+ ... implements(
>+ ... path = "contact"
Please fix the path variable as discussed on IRC.
>+ ... ter(TraverseWit hGet, [ITestDataObject, IBrowserRequest])
>+ ... def __init__(self):
>+ ... self.contacts = CONTACTS
>+ ...
>+ ... def get(self, name):
>+ ... contacts = [contact for contacts in self.contacts
>+ ... if pair.name == name]
>+ ... if len(contacts) == 1:
>+ ... return contacts[0]
>+ ... return None
>+ >>> sm.registerAdap
Line too long.
>=== modified file 'src/lazr/ restful/ docs/webservice .txt' self): ter(TraverseWit hGet, [ITestDataObject, IBrowserRequest])
>@@ -417,16 +406,15 @@
> ... def getAllAuthors(
> ... return self.authors
> ...
>- ... def get(self, name):
>+ ... def get(self, request, name):
> ... match = [p for p in self.authors if p.name == name]
> ... if len(match) > 0:
> ... return match[0]
> ... return None
>
>+ >>> sm.registerAdap
Line too long.