Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uncompleted login page #11

Closed
wants to merge 2 commits into from
Closed

uncompleted login page #11

wants to merge 2 commits into from

Conversation

TarunRaghav3699
Copy link
Contributor

No description provided.

@TarunRaghav3699
Copy link
Contributor Author

dekh le

@Om-Mishra7
Copy link
Contributor

Here are the current issue with the current pull request -

  1. Undefined Variable: organization_logged_in:

    • Issue: The variable organization_logged_in is used but not defined.
    • Solution: Define and manage the organization's login status. Use a session variable determine if the organization is logged in.

    Old Code -

    if organization_logged_in:

    New Code -

    if session.get("logged_in"):
  2. Undefined Function: check_organization_credentials:

    • Issue: The function check_organization_credentials is called but not implemented.
    • Solution: Check the credentials in place
  3. Missing Redirect for Successful Login:

    • Issue: There is no redirect for successful logins.
    • Solution: After successfully checking credentials, redirect the organization to the dashboard or the desired page.
  4. Flash Message for Invalid Credentials:

    • Issue: No flash message is displayed for invalid credentials.
    • Solution: Use the flash function to provide feedback when login fails.
    else:
        flash('Invalid credentials, please try again', 'danger')
  5. Handling HTTP Methods:

    • Issue: The code doesn't distinguish between GET and POST requests.
    • Solution: Use conditional statements to handle GET and POST requests separately.
    if request.method == 'GET':
        # Render the login page
    elif request.method == 'POST':
        # Process the login form

@Om-Mishra7 Om-Mishra7 closed this Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants