Created
October 9, 2011 01:15
-
-
Save mbmccormick/1273141 to your computer and use it in GitHub Desktop.
Telephony Made Easy with Twilio (Part 3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def post(self): | |
alarm = Remindable.get_by_id(int(self.request.get('id'))) | |
try: | |
self.response.headers["Content-Type"] = "text/xml" | |
self.response.out.write("<?xml version='1.0' encoding='UTF-8' ?>\n") | |
self.response.out.write("<Response>") | |
self.response.out.write("<Say>Your remindable has arrived! " + alarm.text + "</Say>") | |
self.response.out.write("</Response>") | |
alarm.delete() | |
except Exception, detail: | |
self.response.out.write('An error occurred while sending a Remindable.\n\nException: %s' % detail) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment