From 22473b6994b425ab2830a0e42406edea4e7348aa Mon Sep 17 00:00:00 2001 From: octopusShiva <48882770+octopusShiva@users.noreply.github.com> Date: Sat, 18 Jan 2020 22:44:10 +0200 Subject: [PATCH 1/3] Update app.py added flash package, added flash message --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index d1680e7..ce3af33 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from flask import Flask, render_template, request, session +from flask import Flask, render_template, request, session, flash import logging from mysql import connector @@ -84,6 +84,7 @@ def check_username(username): result = maulers.fetchall() if not result: # the user doesnt exist + flash("WHOOPS! username could not be found.") return False else: # the user exists From 34989d5401d75b9ee60eab6fb1a932539f9ba46e Mon Sep 17 00:00:00 2001 From: octopusShiva <48882770+octopusShiva@users.noreply.github.com> Date: Sun, 19 Jan 2020 05:25:51 +0200 Subject: [PATCH 2/3] sign_up.html - flash messaging * css classes 'flash' and 'warning' for page orientation and styling * surface area to display flashed messages --- templates/sign_up.html | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/templates/sign_up.html b/templates/sign_up.html index 9431d07..14931d1 100644 --- a/templates/sign_up.html +++ b/templates/sign_up.html @@ -39,6 +39,13 @@ .clear{ clear:both; } + .flash={ + background-color: azure; + } + .warning{ + color: red; + } +