From dbab58e064503cade3fbe2cb58e6879250758143 Mon Sep 17 00:00:00 2001 From: Hellen Onyango Date: Wed, 7 Feb 2024 23:29:13 +0000 Subject: [PATCH] Cade changes adding delivery date column to software --- .DS_Store | Bin 0 -> 6148 bytes app.py | 5 ++++- templates/orders.html | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c9e5bdbc0c6f2eb38164c6983b12c4d29c0f6862 GIT binary patch literal 6148 zcmeHKF;2rk5S)Vu5)dc_1r!LsAQC@tf>R&?1^EDwM1T}yLyQESd&FDl>3Ikb-~m)H zdv^-96QDzYcB8#HuV>G9llV3Vz;vz$+dvaQoi12gVl%_!zW9{Q`N%5K*fCPv?v9fF z$tXFQVrxJZPz8RQ0`l%I;20@CEqd|&l}({dZ@pQwQ(wd$cCmvl4$wol@U{#4p~7z9 zkjyqB>=RpvF(_x4%}PcSR~X_F*EqMmm{%9bFlKg!8)TLIyGs57nHkrUF~48ozJA3W zoo@H~Nt}{HTkEhXjTI+R+wmnsc;70a?-Qna{>;524_2@HYrAS=0l9j zGoL#ptN1O<$SBW$^=0tyg2z-%h$~EisWaY_9qlz%@(UKJJePcPz6+h zi2|}e1a!gBWA4yy9c=6ofLLSL8vC{a5CaJiLyx&bMrg*R5?!kCM-1cA84o-!^q4zz z=`i-m9LGP|_!Elp^~VI34ih@mRuxbM$_mW8%cj)-?&s(Ka*|%D0;<5jQoz)rUew`| zd~KatoYdNYenb}&UhdGQu<_;CcBB-q)2;DdARS`pF?YxaP5%g38MILaepG>Xx5=JZ literal 0 HcmV?d00001 diff --git a/app.py b/app.py index 50f4e29d..aeeb67fc 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() @@ -98,7 +100,8 @@ def add_order(): product_code=product_code, product_quantity=product_quantity, order_date=order_date, - shipping_date=shipping_date + shipping_date=shipping_date, + delivery_date=delivery_date ) # Add the new order to the session and commit to the database diff --git a/templates/orders.html b/templates/orders.html index 9372e2d0..f9be78ea 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 %} @@ -73,6 +75,8 @@

Add New Order



+ +