looking at your python code
By the way, remove your personal data - username, apssword, etc. from pastebin and anyway change them for security reasons
import os import psycopg2 from flask import Flask, session, render_template from flask_session import Session from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker app = Flask(__name__) # Check for environment variable if not os.getenv("DATABASE_URL"): raise RuntimeError("DATABASE_URL is not set") DATABASE_URL = os.environ['DATABASE_URL'] conn = psycopg2.connect(DATABASE_URL, sslmode='require') # Configure session to use filesystem app.config["SESSION_PERMANENT"] = False app.config["SESSION_TYPE"] = "filesystem" Session(app) # Set up database engine = create_engine(os.getenv("DATABASE_URL")) db = scoped_session(sessionmaker(bind=engine)) @app.route("/") def index(): return "Project 1: TODO" try: connection = psycopg2.connect(user = "***", password = "***", host = "***", port = "***", database = "***") cursor = connection.cursor() except (Exception, psycopg2.Error) as error : print ("Error while connecting to PostgreSQL", error) finally: #closing database connection. if(connection): cursor.close() connection.close() print("PostgreSQL connection is closed") @app.route("/register", methods=["GET", "POST"]) def register(): return render_template("register.html") password = request.form.get("password") username = request.form.get("username") session.clear() db.execute("INSERT INTO users (username, password) VALUES (:username, :password") db.commit()On line 58 you always return, so the rest of the code is never executed.
By the way, remove your personal data - username, apssword, etc. from pastebin and anyway change them for security reasons
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs