Skip to content

Commit

Permalink
Send language parameter to login page
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderlindenma committed Nov 11, 2024
1 parent 3ba16b0 commit bcc5a2a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,22 @@
)
def display_page(pathname, user_headers, user_credentials):

print("PATHNAME", pathname)

logger.debug(
"display_page called with pathname: %s, user_headers: %s, user_credentials: %s",
pathname,
user_headers,
user_credentials,
)
if user_headers is None:
logger.info("No user headers found, showing login layout.")
return login_layout()
if pathname == "/" or pathname is None:
logger.info("No user headers found, showing login layout (default language: French).")
return login_layout(lang="french")
if pathname == "/fr":
logger.info("No user headers found, showing login layout (language: French).")
return login_layout(lang="french")
if pathname == "/es":
logger.info("No user headers found, showing login layout (language: Spanish).")
return login_layout(lang="spanish")
if pathname == "/" or pathname is None:
logger.info("Showing homepage layout (default language: French).")
return homepage_layout(user_headers, user_credentials, lang="french")
Expand Down

0 comments on commit bcc5a2a

Please sign in to comment.