Skip to content

Commit

Permalink
Add new dashboard and modify application file
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaLeprechaun committed Sep 10, 2019
1 parent 80466de commit 37e1741
Show file tree
Hide file tree
Showing 9 changed files with 3,362 additions and 214 deletions.
Binary file modified __pycache__/application.cpython-36.pyc
Binary file not shown.
13 changes: 12 additions & 1 deletion application.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
# Ensure templates are auto-reloaded
app.config["TEMPLATES_AUTO_RELOAD"] = True

@app.after_request
def after_request(response):
response.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
response.headers["Expires"] = 0
response.headers["Pragma"] = "no-cache"
return response

app.config["SESSION_FILE_DIR"] = mkdtemp()
app.config["SESSION_PERMANENT"] = False
app.config["SESSION_TYPE"] = "filesystem"
Expand Down Expand Up @@ -79,7 +86,11 @@ def login():
if len(rows) != 1 or not check_password_hash(rows[0]["hash"], password):
return apology("this user does not exist", 400)
session["user_id"] = rows[0]["id"]
return render_template("dashboard-layout.html")

# Grab user details
userDetails = db.execute("SELECT * FROM users WHERE id= :id", id=session["user_id"])
print(userDetails)
return render_template("user-dashboard.html", userDetails=userDetails)
else:
return render_template("login.html")

Expand Down
3 changes: 3 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ a{
background-size: contain;
}

#reframe, #submitted{
display: none;
}
/*transactions table*/
.table-style{
margin-top: 200px !important;
Expand Down
5 changes: 4 additions & 1 deletion static/css/style.dash.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";


body {
font-family: 'Poppins', sans-serif;
background: #fafafa;
Expand Down Expand Up @@ -110,6 +109,10 @@ ul ul a {
font-size: 1.6em
}

/* .main-dashboard {
} */

/* Footer */
footer.main-footer {
position: absolute;
Expand Down
Loading

0 comments on commit 37e1741

Please sign in to comment.