Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -112,6 +112,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
Expand Down
18 changes: 17 additions & 1 deletion templates/sign_up.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
.clear{
clear:both;
}
.flash{
background-color: azure;
}
.warning{
color: red;
}

</style>
<title> Sign-in </title>
</head>
Expand All @@ -47,6 +54,15 @@
{% block content %}
<div class="main">
<div class="sign_in">
<div class="flash warning">
{% with messages = get_flashed_messages() %}
{% if messages %}
{% for message in messages %}
{{message}}
{% endfor %}
{% endif %}
{% endwith %}
</div>
<h2 class="in"> have an account? Sign-in here</h2>
<form name="registration" method="post" action=" " >
<p>
Expand Down Expand Up @@ -95,4 +111,4 @@ <h2 class="up">Don't have an account? Sign-up here</h2>
</div>
{% endblock %}
</body>
</html>
</html>