app/admin/admin_views.py
def put(self, id):
        '''mark order has started being transported'''
        order = Order().get_by_id(id)

        if order:
            if order.status == "completed" or order.status == "declined":
                return {"You already marked the order as {}".format(order.status)}, 200

            if order.status == "Pending":
                return {"message": "please approve the order first"}, 200

            if order.status == "approved":
                order.status = "In Transit"
                return {"message": "The order is now on the road!Rember to keep track of the order"}, 200

        return {"message": "The order could not be found!,check on the id please"}, 404
mark order has started being transported
mark order has started being transported
mark order has started being transported
def put(self, id):
        order = Order().get_by_id(id)
        if order:
            if order.status == "completed" or order.status == "declined":
                return {"You already marked the order as {}".format(order.status)}, 200
            if order.status == "Pending":
                return {"message": "please approve the order first"}, 200
            if order.status == "approved":
                order.status = "In Transit"
                return {"message": "The order is now on the road!Rember to keep track of the order"}, 200
        return {"message": "The order could not be found!,check on the id please"}, 404
def put ( self , id ) : order = Order ( ) . get_by_id ( id ) if order : if order . status == "completed" or order . status == "declined" : return { "You already marked the order as {}" . format ( order . status ) } , 200 if order . status == "Pending" : return { "message" : "please approve the order first" } , 200 if order . status == "approved" : order . status = "In Transit" return { "message" : "The order is now on the road!Rember to keep track of the order" } , 200 return { "message" : "The order could not be found!,check on the id please" } , 404
mark order has started being transported
mark order has started being transported
'''mark order has started being transported'''
self
id