Ahh, silly me.

This is why I shouldn't code so late (early)!

Thanks

On Thu, Jan 3, 2013 at 1:13 AM, DenesL <denes1...@yahoo.ca> wrote:

> Hi Alec,
>
> you are missing the return at the end of the function (additional to the
> one in the GET), e.g.
>
> return locals()
>
> at the very end.
>
> Denes
>
>
> On Wednesday, January 2, 2013 6:28:29 AM UTC-5, Alec Taylor wrote:
>>
>> I have this simple controller:
>>
>> @request.restful()def fevent():
>>     def GET(*args, **kwargs):
>>         print 'hello'
>>         print 'args =', args
>>         print 'kwargs =', kwargs
>>         return dict(foo='foo')
>>
>>
>> But it doesn't work, not even locally. Nothing except link to its ticket
>> appears in my curl -X GET.
>>
>> Errors:
>>
>> <type 'exceptions.AttributeError'>('**NoneType' object has no attribute
>> 'get')
>>
>> *File web2py\gluon\restricted.py in restricted at line 212* code
>> arguments variables
>>
>> 207.
>> 208.
>> 209.
>> 210.
>> 211.
>> 212.
>>
>> 213.
>> 214.
>> 215.
>> 216.
>>
>>     try:
>>         if isinstance(code, types.CodeType):
>>
>>             ccode = code
>>         else:
>>             ccode = compile2(code, layer)
>>         exec ccode in environment
>>
>> Thanks for all suggestions,
>>
>> Alec Taylor
>>
>  --
>
>
>
>

-- 



Reply via email to