link: keywords: author:
comments:
class URL(object): def __init__(self, id, url, comments): self.id, self.url, self.comments = id, url, comments compy.registerAdapter(accessors.ObjectContainer, URL, inevow.IContainer) def data_urls(self, context, data): return self.service.getAll() def render_url(self, context, url): context.tag.fillSlots('link', url.getLink()) context.tag.fillSlots('keywords', ", ".join(url.getKeywords())) context.tag.fillSlots('author', url.getAuthor()) return context.tag def render_comment(self, context, data): context.tag.fillSlots('author', data[0]) context.tag.fillSlots('comment', data[2]) return context.tag