Example #1
0
def remove_slot(request, slot_id):
    if request.is_ajax():
        slot = Slot.objects.get(id=slot_id)
        if slot.patient:
            mail_patient_cancel_appointment_from_doctor(request, slot)
        slot.delete()
        return HttpResponse(json.dumps({'return': True}))
Example #2
0
def remove_slot(request, slot_id):
    if request.is_ajax():
        slot = Slot.objects.get(id=slot_id)
        if slot.patient:
            mail_patient_cancel_appointment_from_doctor(request, slot)
        slot.delete()
        return HttpResponse(json.dumps({'return': True}))
Example #3
0
def clean_slot(request, slot_id):
    if request.is_ajax():
        slot = Slot.objects.get(id=slot_id)
        if slot.patient:
            mail_patient_cancel_appointment_from_doctor(request, slot)
        slot.clean_slot()
        d = {'return': True, 'slot': slot.as_json()}
        return HttpResponse(json.dumps(d))
Example #4
0
def clean_slot(request, slot_id):
    if request.is_ajax():
        slot = Slot.objects.get(id=slot_id)
        if slot.patient:
            mail_patient_cancel_appointment_from_doctor(request, slot)
        slot.clean_slot()
        d = {'return': True, 'slot': slot.as_json()}
        return HttpResponse(json.dumps(d))