--- a/src/pyams_i18n/expr.py Tue Jun 06 17:00:23 2017 +0200
+++ b/src/pyams_i18n/expr.py Wed Jun 21 16:23:21 2017 +0200
@@ -29,11 +29,15 @@
name = name.strip()
if '.' in name:
- context_name, attr = name.split('.')
+ names = name.split('.')
+ context = econtext.get(names[0])
+ for name in names[1:-1]:
+ context = getattr(context, name)
+ attr = names[-1]
else:
context_name = 'context',
+ context = econtext.get(context_name)
attr = name
- context = econtext.get(context_name)
request = econtext.get('request')
return II18n(context).query_attribute(attr, request=request)