nagasurendra commited on
Commit
9bf1d7d
·
verified ·
1 Parent(s): ac58b87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -2,6 +2,7 @@ from flask import Flask, render_template, request, jsonify, redirect, url_for, s
2
  from flask_session import Session # Import the Session class
3
  from flask.sessions import SecureCookieSessionInterface # Import the class
4
  from salesforce import get_salesforce_connection
 
5
  import os
6
 
7
  # Initialize Flask app and Salesforce connection
@@ -103,6 +104,10 @@ def order_history():
103
  except Exception as e:
104
  print(f"Error fetching order history: {str(e)}")
105
  return render_template("order_history.html", orders=[], error=str(e))
 
 
 
 
106
  @app.route("/logout")
107
  def logout():
108
  # Clear session variables
 
2
  from flask_session import Session # Import the Session class
3
  from flask.sessions import SecureCookieSessionInterface # Import the class
4
  from salesforce import get_salesforce_connection
5
+ from datetime import timedelta
6
  import os
7
 
8
  # Initialize Flask app and Salesforce connection
 
104
  except Exception as e:
105
  print(f"Error fetching order history: {str(e)}")
106
  return render_template("order_history.html", orders=[], error=str(e))
107
+ app.permanent_session_lifetime = timedelta(minutes=5)
108
+ @app.route("/dashboard")
109
+ def dashboard():
110
+ return render_template("dashboard.html")
111
  @app.route("/logout")
112
  def logout():
113
  # Clear session variables