mirror of
https://github.com/UofCBaja/BajaCloud.git
synced 2025-07-06 11:07:12 -06:00
feat(django): failure django is not faster than base python, but is WAAAAAYYY EASIER to code in endpoints, and can work with nginx
This commit is contained in:
36
djangotutorial/mysite/methods/postSelectAppointment.py
Normal file
36
djangotutorial/mysite/methods/postSelectAppointment.py
Normal file
@ -0,0 +1,36 @@
|
||||
import json
|
||||
import datetime
|
||||
|
||||
def SelectAppointment (appointmentJson):
|
||||
"""
|
||||
packages up a response for a http request
|
||||
|
||||
``appointmentJSON``: ``JSON``
|
||||
The appointment date and time details
|
||||
|
||||
``returns``: ``json``
|
||||
Returns the status of the booking confirmation
|
||||
|
||||
``Develop in part by``: Brock T
|
||||
|
||||
``Contact``: darkicewolf50@gmail.com
|
||||
"""
|
||||
|
||||
status = mockWriteFunction(appointmentJson)
|
||||
|
||||
if status:
|
||||
resBody = {"Success": True}
|
||||
else:
|
||||
resBody = {"Success": False}
|
||||
|
||||
return {
|
||||
"statusCode": 200,
|
||||
"isBase64ENcoded": "false",
|
||||
"body": json.dumps(resBody)
|
||||
}
|
||||
|
||||
def mockWriteFunction(appTime):
|
||||
return 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(SelectAppointment("10:00 AM"))
|
Reference in New Issue
Block a user