Re: nested dictionaries in templates

2007-05-19 Thread Sven Herzing
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Aidas, thx for the fast help. I hope i get better with django soon, that I can help others too. greets Sven Aidas Bendoraitis wrote: > Hi Sven! > > To get a value from a dictionary by a variable key, you either need a > custom filter like {{ di

Re: nested dictionaries in templates

2007-05-17 Thread Aidas Bendoraitis
Hi Sven! To get a value from a dictionary by a variable key, you either need a custom filter like {{ dictionary|dict_value:key }} def dict_value(dict, key): """ returns the value of a dictionary key ... """ try: return dict[key] except: return None register.filte