Beispiel #1
0
def allOrder(request,store=None):
    order = get_list_or_404(Order,rest_id_id=store,status=0)
    r = serializers.serialize("json",order)
    return HttpResponse(r,content_type='application/json')
Beispiel #2
0
def deliverOrder(request,emp_id=None):
    current_order = get_object_or_404(Delivery,emp_id_id=emp_id)
    order = get_list_or_404(Order,order_id=current_order.current_order)
    print(order)
    r = serializers.serialize("json",order)
    return HttpResponse(r,content_type="application/json")
Beispiel #3
0
def allCook(request,store= None):
    chef = get_list_or_404(Chef,store_id=store)
    r = serializers.serialize("json",chef)
    return HttpResponse(r, content_type='application/json')
Beispiel #4
0
def allDelivery(request,store=None):
    delivery = get_list_or_404(Delivery,store_id=store)
    r = serializers.serialize("json",delivery)
    return HttpResponse(r,content_type='application/json')
Beispiel #5
0
def listOfUnapproveCustomer(request):
    unapprove = get_list_or_404(Customer,approve=0)
    r = serializers.serialize("json",unapprove)
    return HttpResponse(r,content_type='application/json')
Beispiel #6
0
def Ingredients(request):
    ingredient = get_list_or_404(Create_pizza)
    r = serializers.serialize("json",ingredient)
    return HttpResponse(r,content_type='application/json')
Beispiel #7
0
def ListMenu(request,chef=None):
    chefs = get_object_or_404(Chef,emp_id_id=chef)
    instance = get_list_or_404(Menu,chef_id=chefs.chef_id)
    r = serializers.serialize("json", instance)
    return HttpResponse(r,content_type='application/json')