Thanks , It works :)

On Thursday, July 10, 2014 1:00:30 PM UTC+3, Niphlod wrote:
>
> from gluon.storage import Storage
>
>
> mydict = dict(a=1,b=1)
> print mydict['a']
> print mydict.a --> exception
> mydict = Storage(mydict)
> print mydict['a']
> print mydict.a --> no exception
>
>
>
>
> On Thursday, July 10, 2014 4:23:41 AM UTC+2, Omri Levy wrote:
>>
>> Hi ,
>>
>> I have created a class (that i put in models folder), and all it methods 
>> returns complicated dictionaries.
>> When I try to access these variables like Storage (foo.bar) I get the 
>> following exception: 'dict' object has no attribute
>>  I thought that all dictionaries are being converted automatically into 
>> Storage, but i guess they don't.
>> I've tried to wrap the return value with Storage constructor but then I 
>> get an exception saying that there is no such thing as Storage.
>>
>> Can someone please enlighten me?
>>
>> Thanks ,
>>
>> Omri.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to