I'm trying to modify this a bit:

https://github.com/mdipierro/web2py-appliances/tree/master/AppointmentManager

and bumped into this problem of the for loop throwing a ticket. None of the 
suggested solutions seem to work for me. Any way out?

On Saturday, 11 May 2013 23:46:19 UTC+5:30, Massimo Di Pierro wrote:
>
> Replace
>
> {{for t,f in db.t_sys_config._referenced_by:}}
>
> with
>
> {{for x in db.t_sys_config._referenced_by:}}{{t,f = x if 
> isinstance(x,tuple) else (x.tablename,x.name)}}
>
> It should do the trick. Sorry for the late response.
>
> On Wednesday, 1 May 2013 16:37:29 UTC-5, Michael Ellis wrote:
>>
>> I've got an app from before 2.0 with wizard-generated code in multiple 
>> views that looks similar to this.
>>
>> {{=form}}
>> {{for t,f in db.t_sys_config._referenced_by:}}{{if not 
>> t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,
>> form.record.id)))}}]{{pass}}{{pass}}     
>>
>> Under web2py 2.4.6, the for loop throws a ticket because *_referenced_by* 
>> is returning a list of Field objects instead of tuples. The app is running 
>> in almost 100 different servers on 1.99.  How can I modify the app code 
>> (without doing something kludgey like detecting web2py versions) so it will 
>> run under any web2py version?
>>
>> Thanks,
>> Mike
>>
>

-- 
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