I am building an application for admins and users in Flask to request/approve requests. When a user raises a request, the next time the admin logs into the system. I would like the notification bell in my Flask app to reflect the number of new requests.
I understand the HTML, CSS, JS changes and have been using Python for 2+ years.
I just want someone to point me in the right direction of how this can be done and what library. My database is on AWS using Relational Database Service (RDS). I have built the login system, and users can raise requests which adds data to the database. I am just stuck now on how to let the Admin know when logged in.
Your help would be greatly appreciated! I could not see any questions similar to this
I am using MYSQLClient, and I have added my code below of how I display all requests in the terminal, I have other code to display this in Flask App. I would like to just know about newly added requests in the notification dropdown that appears when bell selected.
hostname = 'localhost'
username = 'username'
password = 'password'
database = 'dbname'
def doQuery( conn ) :
cur = conn.cursor()
cur.execute( "SELECT fname, lname FROM employee" )
for firstname, lastname in cur.fetchall() :
print( firstname, lastname )