Please show code!! Richard
On Mon, May 5, 2014 at 8:50 AM, LoveWeb2py <[email protected]> wrote: > Also, > > When I click the submit button in {{=form}} it doesn't actually submit > anything. It just doubles the values that are already in the fields and > puts them into a list. I think I need to do something like db.insert with a > new ID number for the submit button. > > > On Monday, May 5, 2014 8:46:25 AM UTC-4, LoveWeb2py wrote: >> >> 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]> 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]. >>>> 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. > -- 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.

