File documentation.
More...
Go to the source code of this file.
|
def | main.views.index (response) |
| Create your views here. More...
|
|
def | main.views.updater (response) |
|
def | main.views.home (response) |
| This definition is used for Home page rendering.
|
|
def | main.views.success (response) |
| After Submission fo form, this page will be rendered.
|
|
def | main.views.sms_reply (request) |
| This definition is used to check if the user gets registered and sends the respective Response to the user. More...
|
|
def | main.views.register (response) |
| This definition will add entries into the Student Table in the Database.
|
|
File documentation.
Definition in file views.py.
◆ index()
def main.views.index |
( |
|
response | ) |
|
Create your views here.
the default path is loaded to index page which renders base.html page
Definition at line 31 of file views.py.
32 return render(response,
"main/base.html",{})
◆ sms_reply()
def main.views.sms_reply |
( |
|
request | ) |
|
This definition is used to check if the user gets registered and sends the respective Response to the user.
Respond to incoming calls with a simple text message.
Definition at line 57 of file views.py.
57 def sms_reply(request):
58 """Respond to incoming calls with a simple text message."""
60 if request.method ==
"POST":
62 message = request.POST[
'Body']
63 phone_no=request.POST[
'From']
66 phone_no = phone_no[-10:]
67 if Student.objects.filter(phone_number = phone_no).exists():
68 reply=fetch_reply(message,phone_no)
69 resp = MessagingResponse()
72 return HttpResponse(resp)
74 resp = MessagingResponse()
75 resp.message(
"You are not registered!!")
76 return HttpResponse(resp)
78 resp = MessagingResponse()
79 resp.message(
"Phone Number Not found!!")
80 return HttpResponse(resp)