1. base

View function for rendering the 'base.html' template.


    def base(request):
        """
        View function for rendering the 'base.html' template.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'base.html' template.
        """

2. index

View function for rendering the 'index.html' template.


    def index(request):
        """
        View function for rendering the 'index.html' template.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'index.html' template.
        """

3. cashier

View function for rendering the 'cashier.html' template.


    def cashier(request):
        """
        View function for rendering the 'cashier.html' template.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'cashier.html' template.
        """

4. customer_landing

View function for rendering the 'landing.html' template for customers.


    def customer_landing(request):
        """
        View function for rendering the 'landing.html' template for customers.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'landing.html' template.
        """

5. staff_home

View function for rendering the 'staff_landing.html' template for staff members.


    def staff_home(request):
        """
        View function for rendering the 'staff_landing.html' template for staff members.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'staff_landing.html' template.
        """

6. menu_loc

View function for rendering the 'menu_loc.html' template, displaying menu items for a specific location.


    def menu_loc(request):
        """
        View function for rendering the 'menu_loc.html' template, displaying menu items for a specific location.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'menu_loc.html' template.
        """

7. place_order

View function for placing an order.


    @csrf_exempt
    def place_order(request):
        """
        View function for placing an order.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the status of the order placement.
        """

8. delete_order

View function for deleting an order and its associated order items.


    @csrf_exempt
    def delete_order(request):
        """
        View function for deleting an order and its associated order items.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the status of the order deletion.
        """

9. account_details

View function for rendering the 'account_details.html' template, displaying user account details.


    def account_details(request):
        """
        View function for rendering the 'account_details.html' template, displaying user account details.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'account_details.html' template.
        """

10. update_info

View function for updating user information.


    @csrf_exempt
    def update_info(request):
        """
        View function for updating user information.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the status of the information update.
        """

11. update_favorite

View function for updating the favorite status of an order.


    @csrf_exempt
    def update_favorite(request):
        """
        View function for updating the favorite status of an order.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the status of the favorite status update.
        """

12. manager_home

View function for rendering the 'manager_home.html' template, displaying manager-specific content.


    def manager_home(request):
        """
        View function for rendering the 'manager_home.html' template, displaying manager-specific content.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'manager_home.html' template.
        """

13. sales_analysis

View function for rendering the 'sales_report.html' template, displaying sales analysis for managers.


    def sales_analysis(request):
        """
        View function for rendering the 'sales_report.html' template, displaying sales analysis for managers.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'sales_report.html' template.
        """

14. new_excess_time

View function for retrieving excess time alerts within a specified date range.


    @csrf_exempt
    def new_excess_time(request):
        """
        View function for retrieving excess time alerts within a specified date range.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response containing the excess time alerts.
        """

15. alerts

View function for rendering the 'alerts.html' template, displaying various alerts and reports for managers.


    def alerts(request):
        """
        View function for rendering the 'alerts.html' template, displaying various alerts and reports for managers.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'alerts.html' template.
        """

16. get_sales_graph

View function for retrieving sales graph data and returning it as HTML.


    def get_sales_graph(request):
        """
        View function for retrieving sales graph data and returning it as HTML.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response containing the sales graph HTML.
        """

17. get_stock_graph

View function for retrieving stock graph data and returning it as HTML.


    def get_stock_graph(request):
        """
        View function for retrieving stock graph data and returning it as HTML.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response containing the stock graph HTML.
        """

18. ingredients

View function for rendering the 'ingredients.html' template, displaying ingredient information for managers.


    def ingredients(request):
        """
        View function for rendering the 'ingredients.html' template, displaying ingredient information for managers.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'ingredients.html' template.
        """

19. update_items

View function for rendering the 'update_items.html' template, displaying item update information for managers.


    def update_items(request):
        """
        View function for rendering the 'update_items.html' template, displaying item update information for managers.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'update_items.html' template.
        """

20. about

View function for rendering the 'update_items.html' template, displaying item update information for managers.


    def about(request):
        """
        View function for rendering the 'update_items.html' template, displaying item update information for managers.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'update_items.html' template.
        """

21. order_online

View function for rendering the 'order_online.html' template, allowing users to place online orders.


    def order_online(request):
        """
        View function for rendering the 'order_online.html' template, allowing users to place online orders.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'order_online.html' template.
        """

22. ajax_delete

View function for handling an AJAX request to update the category of an item.


    def ajax_delete(request):
        """
        View function for handling an AJAX request to update the category of an item.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the success or failure of the update.
        """

23. checkout_order

View function for rendering the 'checkout_order.html' template, allowing users to checkout and place an order.


    def checkout_order(request):
        """
        View function for rendering the 'checkout_order.html' template, allowing users to checkout and place an order.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'checkout_order.html' template.
        """

24. order_history

View function for rendering the 'order_history.html' template, displaying the order history.


    def order_history(request):
        """
        View function for rendering the 'order_history.html' template, displaying the order history.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'order_history.html' template.
        """

25. new_order_history

View function for handling new order history requests via POST method.


    @csrf_exempt
    def new_order_history(request):
        """
        View function for handling new order history requests via POST method.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response containing the order history data.
        """

26. edit_order_view

View function for rendering the order editing page.


    def edit_order_view(request, order_id):
        """
        View function for rendering the order editing page.

        Parameters:
        - request (HttpRequest): The HTTP request object.
        - order_id (int): The ID of the order to be edited.

        Returns:
        - HttpResponse: Rendered response containing the 'edit_order.html' template.
        """

27. create_item

View function for rendering the page to create a new item.


    def create_item(request):
        """
        View function for rendering the page to create a new item.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered response containing the 'create_item.html' template.
        """

28. edit_item

View function for rendering the page to edit an existing item.


    def edit_item(request, item_id):
        """
        View function for rendering the page to edit an existing item.

        Parameters:
        - request (HttpRequest): The HTTP request object.
        - item_id (int): The ID of the item to be edited.

        Returns:
        - HttpResponse: Rendered response containing the 'edit_item.html' template.
        """

29. save_order

View function for handling the creation or update of orders.


    @csrf_exempt
    def save_order(request):
        """
        View function for handling the creation or update of orders.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the success or failure of the operation.
        """

30. create_item_submit

View function for handling the creation or update of items.


    @csrf_exempt
    def create_item_submit(request):
        """
        View function for handling the creation or update of items.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the success or failure of the operation.
        """

31. update_stock

View function for updating the stock of an ingredient.


    @csrf_exempt
    def update_stock(request):
        """
        View function for updating the stock of an ingredient.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the success or failure of the operation.
        """

32. delete_ingredient

View function for deleting an ingredient.


    @csrf_exempt
    def delete_ingredient(request):
        """
        View function for deleting an ingredient.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the success or failure of the delete operation.
        """

33. add_new_ingredient

View function for adding a new ingredient.


    @csrf_exempt
    def add_new_ingredient(request):
        """
        View function for adding a new ingredient.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the success or failure of the addition.
        """

34. kitchen

View function for rendering the kitchen dashboard, displaying mobile orders.


    def kitchen(request):
        """
        View function for rendering the kitchen dashboard, displaying mobile orders.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - HttpResponse: Rendered HTML response displaying kitchen orders.
        """

35. kitchen_deliver

View function for updating the delivery status of a kitchen order.


    @csrf_exempt
    def kitchen_deliver(request):
        """
        View function for updating the delivery status of a kitchen order.

        Parameters:
        - request (HttpRequest): The HTTP request object.

        Returns:
        - JsonResponse: JSON response indicating the success or error status of the operation.
        """