@twilio_view
def read_notification(request, id, user_id):
    resp = twiml.Response()
    try:
        notification = ScheduledNotification.objects.get(id=id)
        user = User.objects.get(id=user_id)
        resp.say("Hello %s" % user.username)
        resp.say(notification.message)
        with resp.gather(numDigits=1, action="/twilio/handle/%s/%s" % (id, user_id), method="GET") as g:
            g.say("Press 1 to Acknowledge")
            g.say("Press 2 to Resolve")
            g.say("Press 3 to do nothing")
    except ScheduledNotification.DoesNotExist:
        resp.say("Incident already resolved. Lucky you.")
    except User.DoesNotExist:
        resp.say("Go away, scriptkiddie.")
    return resp
dataset/ETHPy150Open ustream/openduty/openduty/call_handler.py/read_notification/original