I have this problem with version 2.9.12
works with form but not factory.
tried workaround but can't get syntax right. Workaround error is does not
know global "os" Can someone please post workaround syntax for me?
Here is my factory code:
form=SQLFORM(db.SuperObject,db.Party,db.auth_user,db.PartyAddressIntersection,db.Address)
if form.process().accepted:
response.flash='Thanks for filling the form'
form.vars.displayName = form.vars.objectDisplayName =
'%(first_name)s %(last_name)s' % form.vars
form.vars.superObjectID =
db.SuperObject.insert(**db.SuperObject._filter_fields(form.vars))
form.vars.partyID =
db.Party.insert(**db.Party._filter_fields(form.vars))
db.auth_user.insert(**db.auth_user._filter_fields(form.vars))
form.vars.addressID =
db.Address.insert(**db.Address._filter_fields(form.vars))
db.PartyAddressIntersection.insert(**db.PartyAddressIntersection._filter_fields(form.vars))
the upload field is in db.auth.user (extra fields):
Field('thumbnail', 'upload'),
thanks,
Alex Glaros
--
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.