provide field instance with context and request information, e.g. for use in persistent vocabularies
This commit is contained in:
parent
907e9c4da8
commit
4fba2c1e27
2 changed files with 3 additions and 2 deletions
|
@ -235,7 +235,7 @@ class ConceptView(BaseView):
|
|||
return self.adapted.description
|
||||
|
||||
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]
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
<tal:row repeat="field fields">
|
||||
<tr tal:define="fieldName field/name;
|
||||
value nocall:data/?fieldName;
|
||||
fieldInstance field/getFieldInstance;
|
||||
fieldInstance python:field.getFieldInstance(
|
||||
context=context, request=request);
|
||||
rendererName field/displayRenderer;
|
||||
renderer python:fieldInstance.getRenderer(rendererName) or
|
||||
view.concept_macros[rendererName]"
|
||||
|
|
Loading…
Add table
Reference in a new issue