Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,6 +51,7 @@ def generate_coupon_code(length=10):
|
|
51 |
"""Generate a unique alphanumeric coupon code."""
|
52 |
return ''.join(random.choices(string.ascii_uppercase + string.digits, k=length))
|
53 |
|
|
|
54 |
def process_referral_code(referral_code):
|
55 |
"""
|
56 |
Process the referral code by creating a referral coupon if the referrer is found.
|
@@ -96,7 +97,7 @@ def signup():
|
|
96 |
phone = request.form.get("phone")
|
97 |
email = request.form.get("email")
|
98 |
password = request.form.get("password")
|
99 |
-
referral_code = request.form.get("
|
100 |
try:
|
101 |
# Step 1: Generate a unique referral code for the new user
|
102 |
while True:
|
|
|
51 |
"""Generate a unique alphanumeric coupon code."""
|
52 |
return ''.join(random.choices(string.ascii_uppercase + string.digits, k=length))
|
53 |
|
54 |
+
|
55 |
def process_referral_code(referral_code):
|
56 |
"""
|
57 |
Process the referral code by creating a referral coupon if the referrer is found.
|
|
|
97 |
phone = request.form.get("phone")
|
98 |
email = request.form.get("email")
|
99 |
password = request.form.get("password")
|
100 |
+
referral_code = request.form.get("referral")
|
101 |
try:
|
102 |
# Step 1: Generate a unique referral code for the new user
|
103 |
while True:
|