Richard/Niphold,

Thank you so much. It's almost done. Just getting attribute error now but I 
am going to try to fix that with exception handling. 

<type 'exceptions.AttributeError'> 'str' object has no attribute 'year'

I have a modified_on field which is set to datetime. WHen I comment that 
out it transfers to the next page with no problem. Any thoughts on how I 
could fix?

On Sunday, May 4, 2014 9:10:55 AM UTC-4, Richard wrote:
>
> Sorry for miss leading, Niphold is true...
>
> So, 
>
> for f, v in request.vars.iteritmes():
>      db.table[f].default = v
>
>
> On Sat, May 3, 2014 at 8:47 AM, Niphlod <[email protected] <javascript:>>wrote:
>
>> request.vars is like a dict. Surely you're hitting that issue :-P
>>
>> >>> test = dict(a=1,b=2)
>> >>> for k,v in test:
>> ...    print k, v
>> ... 
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>> ValueError: need more than 1 value to unpack
>> >>> 
>>
>> Add an "iteritems()" and you're good to go
>>
>> >>> for k,v in test.iteritems():
>> ...     print k,v 
>> ... 
>> a 1
>> b 2
>>
>> >>> 
>>
>> On Friday, May 2, 2014 11:20:40 PM UTC+2, LoveWeb2py wrote:
>>>
>>> Web2py admin console has a red line at for f, v in request.vars: and 
>>> then says too many values to unpack. 
>>>
>>> my function is def transition_form():
>>>      for f, v in request.vars:
>>>      db.table[f].default = v
>>>  form = SQLFORM(db.table, user_signature=True)
>>> return dict(form=form)
>>>
>>> Should I have extra values in the dict method?
>>>
>>  -- 
>> 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.

Reply via email to