def prescription(request): if request.method == "POST": uid = request.POST.get("userid") did = request.POST.get("doctorid") pres = request.POST.get("prescription") print(pres, uid, did) Prescription(prescription=pres, userid_id=uid, doctorid_id=did).save() return __views.back(request)
def appoinment(request): if request.method == "POST": cid = request.POST.get("consultid") uid = request.POST.get("userid") did = request.POST.get("doctorid") print(cid, uid, did) Appoinment(consultid_id=cid, userid_id=uid, doctorid_id=did).save() return __views.back(request)
def message(request): if request.method == "POST": msg = request.POST.get('message') did = request.POST.get("doctorid") uid = request.POST.get("userid") ty = request.POST.get("type") Message(message=msg, doctorid_id=did, userid_id=uid, type=ty).save() return __views.back(request)
def addconsulting(request): if request.method == "POST": details = request.POST.get('details') did = request.POST.get("doctorid") Consult(details=details, doctorid_id=did).save() return __views.back(request)
def deletecart(request, id): dlt = Cart.objects.get(pk=id) dlt.delete() return __views.back(request)