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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""
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.
"""