Skip to content

Commit

Permalink
added print statement to parse twilio request
Browse files Browse the repository at this point in the history
  • Loading branch information
Sail338 committed Jul 3, 2018
1 parent 3e41aab commit 32f7c60
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions garfield/lookup/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# Create your views here.
@twilio_view
def index(request):
print(request)
response = MessagingResponse()
response.message(lookup_contact("+17327591778"))
return response
Expand All @@ -29,8 +30,10 @@ def index(request):
#response.message("Hello World!")
#return response

def lookup_contact(contact_number):
contact = Contact.objects.all()#(phone_number = contact_number)
def lookup_contact(contact_number:str):
suspect_information = {}
contact = Contact.objects.get(phone_number = contact_number)
print(contact)
if contact != None:
return (contact[0].nextcaller_first_name)
else:
Expand Down

0 comments on commit 32f7c60

Please sign in to comment.