From eb9b90baaf66d92ef2367650ddfdaaa03090a703 Mon Sep 17 00:00:00 2001 From: MikhaelaRoy Date: Mon, 26 Feb 2024 17:21:32 +0000 Subject: [PATCH 1/2] Updating app.py --- app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.py b/app.py index 50f4e29d..5ea7f02b 100644 --- a/app.py +++ b/app.py @@ -46,6 +46,7 @@ class Order(Base): product_quantity = Column('Product Quantity', Integer) order_date = Column('Order Date', DateTime) shipping_date = Column('Shipping Date', DateTime) + delivery_date = Column('Delivery Date', DateTime) # define routes # route to display orders @@ -85,6 +86,7 @@ def add_order(): product_quantity = request.form.get('product_quantity') order_date = request.form.get('order_date') shipping_date = request.form.get('shipping_date') + delivery_date = request.form['delivery date'] # Create a session to interact with the database session = Session() @@ -99,6 +101,7 @@ def add_order(): product_quantity=product_quantity, order_date=order_date, shipping_date=shipping_date + delivery_date=delivery_date ) # Add the new order to the session and commit to the database From b8cd16cecf94b29a7244aa663315ab2305ff4b98 Mon Sep 17 00:00:00 2001 From: MikhaelaRoy Date: Mon, 26 Feb 2024 17:30:29 +0000 Subject: [PATCH 2/2] Update orders.html Created variables to include the delivery date column --- templates/orders.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/orders.html b/templates/orders.html index 9372e2d0..fde1c740 100644 --- a/templates/orders.html +++ b/templates/orders.html @@ -27,6 +27,7 @@

Order List

Product Quantity Order Date Shipping Date + Delivery Date @@ -40,6 +41,7 @@

Order List

{{ order.product_quantity }} {{ order.order_date }} {{ order.shipping_date }} + {{ order.delivery_date }} {% endfor %} @@ -74,6 +76,9 @@

Add New Order


+ +

+