Beispiel #1
0
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)
Beispiel #2
0
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)
Beispiel #3
0
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)
Beispiel #4
0
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)
Beispiel #5
0
def deletecart(request, id):
    dlt = Cart.objects.get(pk=id)
    dlt.delete()
    return __views.back(request)