From 779d833ae5d0ebc1e2147840af546f09bf082d5b Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Sat, 5 Nov 2022 15:31:38 +0000 Subject: [PATCH 1/2] journey_complete -> signal_journey_complete Ref https://github.com/Subscribie/subscribie/issues/986 --- __init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__init__.py b/__init__.py index 787fa06..dfe1f0e 100644 --- a/__init__.py +++ b/__init__.py @@ -10,7 +10,7 @@ ) from flask_mail import Mail, Message import requests -from subscribie.signals import journey_complete +from subscribie.signals import signal_journey_complete from subscribie.tasks import task_queue from .forms import SignupForm from subscribie.forms import LoginForm @@ -264,4 +264,4 @@ def getPlan(container, i, default=None): # Subscribers -journey_complete.connect(journey_complete_subscriber) +signal_journey_complete.connect(journey_complete_subscriber) From 4cc3b987481b7327da070153e521ab72d0e97153 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 7 Mar 2023 22:19:23 -0400 Subject: [PATCH 2/2] #52 changing email register from case sensitive to not case sensitive --- __init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/__init__.py b/__init__.py index dfe1f0e..d8c78b0 100644 --- a/__init__.py +++ b/__init__.py @@ -58,7 +58,7 @@ def submit_new_site_build( """ payload = {} payload["version"] = 1 - payload["users"] = [form.email.data] + payload["users"] = [form.email.data.lower()] payload["password"] = form.password.data payload["login_token"] = login_token company_name = form.company_name.data @@ -133,16 +133,16 @@ def submit_new_site_build( # Store new site in builder_sites table to allow logging in from subscribie site # noqa: E501 con = sqlite3.connect(app_config.get("DB_FULL_PATH")) - email = form.email.data + email = form.email.data.lower() query = "INSERT INTO builder_sites (site_url, email) VALUES (?, ?)" - con.execute(query, (new_site_url, email.lower())) + con.execute(query, (new_site_url, email)) con.commit() @builder.route("/start-building", methods=["POST"]) def save_plans(): form = SignupForm() - session["email"] = form.email.data + session["email"] = form.email.data.lower() domain = app.config.get("SUBSCRIBIE_DOMAIN", ".subscriby.shop") subdomain = create_subdomain_string(form.company_name.data) @@ -182,7 +182,7 @@ def choose_package(sitename=None): def journey_complete_subscriber(sender, **kw): print("Journery Complete! Send an email or something..") try: - email = kw["email"] + email = kw["email"].lower() sender = app.config.get("MAIL_DEFAULT_SENDER", "hello@example.com") login_url = session["login-url"] msg = Message(