Skip to content

Instantly share code, notes, and snippets.

View andyhasit's full-sized avatar

Andrew Buchan andyhasit

View GitHub Profile
'''
Here's a suggested revision with following changes:
1) Renamed field "message" as that is a reserved keyword in some dbs (must remember to change form.vars.message to form.vars.form_message in the call to send or it will be null and you get a nasty error, in 2.14.6 at least)
2) Checks if email actually sent, as otherwise the notification is erroneous.
3) Added reply_to, which helps.
3) Changed to use modern string formatting, just because.
4) Changed to not use flash message unless there's an error, because I think its nicer, but you may disagree :-)
'''
# append to scaffoling models/db.py