Update app.py
Browse files
app.py
CHANGED
|
@@ -305,6 +305,10 @@ def order_history():
|
|
| 305 |
# Format the date and time in the desired format
|
| 306 |
order['formatted_date'] = local_datetime.strftime('%B %d, %I:%M %p')
|
| 307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 308 |
return render_template("order_history.html", orders=orders)
|
| 309 |
|
| 310 |
except Exception as e:
|
|
@@ -312,7 +316,6 @@ def order_history():
|
|
| 312 |
return render_template("order_history.html", orders=[], error=str(e))
|
| 313 |
|
| 314 |
|
| 315 |
-
|
| 316 |
app.permanent_session_lifetime = timedelta(minutes=5)
|
| 317 |
@app.before_request
|
| 318 |
def check_session_timeout():
|
|
|
|
| 305 |
# Format the date and time in the desired format
|
| 306 |
order['formatted_date'] = local_datetime.strftime('%B %d, %I:%M %p')
|
| 307 |
|
| 308 |
+
order_status = order.get("Order_Status__c", "N/A") # Default to "N/A" if no status
|
| 309 |
+
order['order_status'] = order_status
|
| 310 |
+
|
| 311 |
+
|
| 312 |
return render_template("order_history.html", orders=orders)
|
| 313 |
|
| 314 |
except Exception as e:
|
|
|
|
| 316 |
return render_template("order_history.html", orders=[], error=str(e))
|
| 317 |
|
| 318 |
|
|
|
|
| 319 |
app.permanent_session_lifetime = timedelta(minutes=5)
|
| 320 |
@app.before_request
|
| 321 |
def check_session_timeout():
|