Thanks, Roberto! Works great now!
On Saturday, May 10, 2014 9:51:28 PM UTC-4, Roberto Perdomo wrote:
>
> This line can work too:
>
> {{for x in db.t_appointment._referenced_by:}}{{t,f = x if
> isinstance(x,tuple) else (x.tablename,x.name)}}{{if not
> t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,
> form.record.id)))}}]{{pass}}{{pass}}
>
> You can replace that form with a grid:
>
>
> http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-grid-and-SQLFORM-smartgrid
>
>
> 2014-05-10 21:13 GMT-04:30 Roberto Perdomo <[email protected]<javascript:>
> >:
>
>> Hello,
>>
>> Try changing the line 8 in default/appointment_read.html:
>>
>> {{for t,f in db.t_appointment._referenced_by:}}{{if not
>> t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,
>> form.record.id)))}}]{{pass}}{{pass}}
>>
>> to this:
>>
>> {{for f in db.t_appointment._referenced_by:}}{{t=f.tablename}}{{if not
>> t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,
>> form.record.id)))}}]{{pass}}{{pass}}
>>
>>
>> 2014-05-10 19:57 GMT-04:30 LoveWeb2py <[email protected] <javascript:>>:
>>
>> Is there any interest in fixing this app or how I could fix it?
>>>
>>>
>>> On Sunday, April 20, 2014 6:02:03 PM UTC-4, LoveWeb2py wrote:
>>>>
>>>> Hello,
>>>>
>>>> I'm trying to create a website for my Mom that she can use to book
>>>> appointments. She has a day spa and really could use something like the
>>>> appointment manager.
>>>>
>>>> I have a fresh copy of web2py installed (latest version) and a fresh
>>>> install of the appointment manager app.
>>>> I installed the app through the app manager and when I try to create an
>>>> appointment I get this error:
>>>> <type 'exceptions.ValueError'> too many values to unpack
>>>>
>>>> here is the traceback:
>>>> Traceback
>>>>
>>>> 1.
>>>> 2.
>>>> 3.
>>>> 4.
>>>> 5.
>>>> 6.
>>>>
>>>> Traceback (most recent call last):
>>>> File "/home/web2py/spa/gluon/restricted.py", line 220, in restricted
>>>>
>>>>
>>>> exec ccode in environment
>>>> File
>>>> "/home/web2py/spa/applications/appointments/views/default/appointment_read.html",
>>>> line 103, in <module>
>>>>
>>>> ValueError: too many values to unpack
>>>>
>>>> and here is the highlighted line of code in appointment_read.html
>>>> for t,f in db.t_appointment._referenced_by:
>>>>
>>>> any thoughts why I might be getting this error?
>>>>
>>> --
>>> 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 [email protected] <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.