Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,6 @@ from flask.sessions import SecureCookieSessionInterface # Import the class
|
|
| 4 |
from salesforce import get_salesforce_connection
|
| 5 |
from datetime import timedelta
|
| 6 |
import os
|
| 7 |
-
from app import orderhistory
|
| 8 |
|
| 9 |
# Initialize Flask app and Salesforce connection
|
| 10 |
print("Starting app...")
|
|
@@ -34,6 +33,12 @@ print("Session interface configured.")
|
|
| 34 |
import random
|
| 35 |
import string
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
def generate_referral_code(length=8):
|
| 38 |
# Generates a random referral code with uppercase, lowercase letters, and digits
|
| 39 |
characters = string.ascii_letters + string.digits # A-Z, a-z, 0-9
|
|
|
|
| 4 |
from salesforce import get_salesforce_connection
|
| 5 |
from datetime import timedelta
|
| 6 |
import os
|
|
|
|
| 7 |
|
| 8 |
# Initialize Flask app and Salesforce connection
|
| 9 |
print("Starting app...")
|
|
|
|
| 33 |
import random
|
| 34 |
import string
|
| 35 |
|
| 36 |
+
def some_function():
|
| 37 |
+
from app import orderhistory
|
| 38 |
+
# Now you can use orderhistory inside this function
|
| 39 |
+
history = orderhistory.OrderHistory()
|
| 40 |
+
history.some_method()
|
| 41 |
+
|
| 42 |
def generate_referral_code(length=8):
|
| 43 |
# Generates a random referral code with uppercase, lowercase letters, and digits
|
| 44 |
characters = string.ascii_letters + string.digits # A-Z, a-z, 0-9
|