projects
/
Portfolio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0971623
)
getattr -> restrictedTraverse : si on utilise geattr au lieu de restrictedTraverse...
author
Benoît Pin
<pin@cri.ensmp.fr>
Wed, 2 Apr 2014 09:04:14 +0000
(11:04 +0200)
committer
Benoît Pin
<pin@cri.ensmp.fr>
Wed, 2 Apr 2014 09:04:14 +0000
(11:04 +0200)
skins/selectioncontext.py
patch
|
blob
|
history
diff --git
a/skins/selectioncontext.py
b/skins/selectioncontext.py
index
36727f6
..
8539a4e
100644
(file)
--- a/
skins/selectioncontext.py
+++ b/
skins/selectioncontext.py
@@
-60,7
+60,8
@@
if ajax == True :
photoPath = list(photo.getPhysicalPath())
photoPath.insert(portalDepth, 'selectioncontext')
options['lastBcUrl'] = toUrl(photoPath)
photoPath = list(photo.getPhysicalPath())
photoPath.insert(portalDepth, 'selectioncontext')
options['lastBcUrl'] = toUrl(photoPath)
- meth = getattr(photo, 'photo_view_ajax_template')
+ app = context.restrictedTraverse('/')
+ meth = app.restrictedTraverse(photo.getPhysicalPath() + ('photo_view_ajax_template',))
return meth(req, resp, **options)
return meth(req, resp, **options)
@@
-134,5
+135,6
@@
options['breadcrumbs'] = breadcrumbs
ti = photo.getTypeInfo()
method_id = ti.queryMethodID('view', context=photo)
ti = photo.getTypeInfo()
method_id = ti.queryMethodID('view', context=photo)
-meth = getattr(photo, method_id)
+app = context.restrictedTraverse('/')
+meth = app.restrictedTraverse(photo.getPhysicalPath() + (method_id,))
return meth(req, resp, **options)
return meth(req, resp, **options)