That was my latest and yes, it does result in an error. The original was:
def new_post():
form = SQLFORM(db.post)
if form.accepts(request, formname=None):
mail.send(to=['[email protected]'],subject='DistroBeef Retailer
Contact',message='Test')
return DIV("Thank you for contacting us! We have received your
information and will contact you shortly.")
elif form.errors:
return TABLE(*[TR(k, v) for k, v in form.errors.items()])
This works and I get test as a message. Next try was:
def new_post():
form = SQLFORM(db.post)
if form.accepts(request, formname=None):
mail.send(to=['[email protected]'],subject='DistroBeef Retailer
Contact',message='request.vars.
>
>
> distributor,request.vars.dba,request.vars.contactnum,request.vars.fax,request.vars.location,request.vars.locationtwo,request.vars.city,request.vars.state,request.vars.zip,
> request.vars.name,request.vars.contact,request.vars.email
')
return DIV("Thank you for contacting us! We have received your
information and will contact you shortly.")
elif form.errors:
return TABLE(*[TR(k, v) for k, v in form.errors.items()])
And no luck. It just prints that verbatim. I tried quoted, unquoted,
bracketed and ended up on the version I posted in the first comment.
The goal is just to return the values of the fields the user typed. Nothing
fancy. Just a boring old list of items.