From 0162adea946609ff15ad82d9cc96a2bbb2d07b62 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Tue, 27 Dec 2011 20:11:00 +0100 Subject: [PATCH] use data table as basis for vocabularies --- browser/concept.py | 4 ++-- browser/concept_macros.pt | 8 ++++++-- browser/configure.zcml | 4 ++++ table.py | 32 ++++++++++++++++++++++++++++++-- 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/browser/concept.py b/browser/concept.py index a186835..6d349d2 100644 --- a/browser/concept.py +++ b/browser/concept.py @@ -137,7 +137,7 @@ class BaseRelationView(BaseView): return self.getData() def getData(self): - return self.instance.applyTemplate() + return self.instance.applyTemplate(context=self.context, request=self.request) @Lazy def instance(self): @@ -248,7 +248,7 @@ class ConceptView(BaseView): return None def getData(self, omit=('title', 'description')): - data = self.instance.applyTemplate() + data = self.instance.applyTemplate(context=self.context, request=self.request) for k in omit: if k in data: del data[k] diff --git a/browser/concept_macros.pt b/browser/concept_macros.pt index ea4e041..1288938 100644 --- a/browser/concept_macros.pt +++ b/browser/concept_macros.pt @@ -50,10 +50,14 @@ : - + diff --git a/browser/configure.zcml b/browser/configure.zcml index 6dee3f7..3c4e82d 100644 --- a/browser/configure.zcml +++ b/browser/configure.zcml @@ -693,6 +693,10 @@ for="loops.view.NodeTypeSourceList zope.publisher.interfaces.browser.IBrowserRequest" /> + +