I found why and fixed it. one of the values of the dict is of boolean type and it caused the exception. so i changed the repeat code like this: <li tal:repeat="key settings.keys()" tal:content="string(settings[key])"></li>
Thanks. On Thursday, March 31, 2011 at 1:16 AM, Chris McDonough wrote: > On Wed, 2011-03-30 at 21:59 +0900, Ha Nyung Chung wrote: > > Can I iterate all values in dict object in a chameleon template? > > I made view callable return dict object named "params", which contains > > all parameter key/value pairs and > > chose to use chameleon template as a renderer. > > I wanted to iterate every key and value pairs of "params" in the > > template file, but couldn't find how to do that. > > > > > > the following code worked well while just displaying "params"' keys: > > <li tal:repeat="key settings.keys()" tal:content="key"></li> > > > > > > But this code raised an exception saying "'NoneType' object is not > > callable": > > <li tal:repeat="key settings.keys()" tal:content="settings[key]"></li> > > Could you provide a traceback? > > - C > > > > > > -- > > You received this message because you are subscribed to the Google > > Groups "pylons-devel" group. > > To post to this group, send email to pylons-devel@googlegroups.com. > > To unsubscribe from this group, send email to pylons-devel > > +unsubscr...@googlegroups.com. > > For more options, visit this group at > > http://groups.google.com/group/pylons-devel?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "pylons-devel" group. > To post to this group, send email to pylons-devel@googlegroups.com. > To unsubscribe from this group, send email to > pylons-devel+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/pylons-devel?hl=en. > -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.