Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,9 +2,10 @@ from flask import Flask, render_template, request
|
|
| 2 |
from simple_salesforce import Salesforce
|
| 3 |
import os
|
| 4 |
|
|
|
|
| 5 |
app = Flask(__name__)
|
| 6 |
|
| 7 |
-
# Salesforce credentials
|
| 8 |
SF_USERNAME = os.getenv("SF_USERNAME", "diggavalli98@gmail.com")
|
| 9 |
SF_PASSWORD = os.getenv("SF_PASSWORD", "Sati@1020")
|
| 10 |
SF_SECURITY_TOKEN = os.getenv("SF_SECURITY_TOKEN", "sSSjyhInIsUohKpG8sHzty2q")
|
|
@@ -31,6 +32,6 @@ def menu():
|
|
| 31 |
|
| 32 |
return render_template("menu.html", food_items=food_items, categories=categories, selected_category=selected_category)
|
| 33 |
|
| 34 |
-
#
|
| 35 |
if __name__ == "__main__":
|
| 36 |
-
|
|
|
|
| 2 |
from simple_salesforce import Salesforce
|
| 3 |
import os
|
| 4 |
|
| 5 |
+
# Initialize Flask app
|
| 6 |
app = Flask(__name__)
|
| 7 |
|
| 8 |
+
# Salesforce credentials (Use environment variables for security in production)
|
| 9 |
SF_USERNAME = os.getenv("SF_USERNAME", "diggavalli98@gmail.com")
|
| 10 |
SF_PASSWORD = os.getenv("SF_PASSWORD", "Sati@1020")
|
| 11 |
SF_SECURITY_TOKEN = os.getenv("SF_SECURITY_TOKEN", "sSSjyhInIsUohKpG8sHzty2q")
|
|
|
|
| 32 |
|
| 33 |
return render_template("menu.html", food_items=food_items, categories=categories, selected_category=selected_category)
|
| 34 |
|
| 35 |
+
# Gunicorn will automatically find this app instance and run it
|
| 36 |
if __name__ == "__main__":
|
| 37 |
+
app.run(debug=True) # Only used in development, not in production
|