Skip to content

[MuLearn Community]: Date format in blocking message is not user friendly in the full official format #2660

Description

@ShreyaLbs

Ticket Contents

Description

When a user gets blocked after multiple failed login attempts, the app shows a blocking message with the date and time in a raw technical format 2026-03-15 12:12 PM which is how dates are stored in a database. This format is not something a regular user would easily understand. Most users are used to seeing dates written in a simple readable way like "15 March 2026 at 12:12 PM". Showing a raw database format makes the app feel unpolished and can confuse users about when exactly they will be unblocked and able to try logging in again.

Goals

Goals

-Make the blocking message easy to understand for any regular user
-Remove confusion about when exactly the user will be unblocked
-Make the app feel polished and professional
-Ensure date and time is displayed in a format that matches how users naturally read dates in everyday life
-Improve the overall user experience during error and blocking scenarios
-Maintain consistency in how dates and times are displayed across the entire app

Expected Outcome

The blocking message should display the date and time in a simple human readable format that any user can easily understand, for example:

"Too many failed login attempts. You are blocked until 15 March 2026 at 12:12 PM. Please try again later."

Acceptance Criteria

-Blocking message displays date in a readable format like "15 March 2026 at 12:12 PM" instead of 2026-03-15 12:12 PM
-The full message reads naturally and is grammatically correct
-A user with no technical background can clearly understand when they will be unblocked
-Date format is consistent with how dates are shown in other parts of the app
-Verified working on both mobile and desktop screens
-Blocking message tested and confirmed readable in both password and OTP login modes

Implementation Details

Backend:

Find the part of the code in api/auth/ where the blocking message and date are generated
Format the date using Python's strftime function to convert 2026-03-15 12:12 PM into a readable format like "15 March 2026 at 12:12 PM" before sending it in the API response
Make sure the formatted date is included in a properly worded complete sentence in the response message

Frontend:

Read the formatted date from the API response and display it correctly on screen
Make sure the message appears near the input field and not at the bottom of the screen

Technologies Used:

Python — to format the date using strftime before sending the response
Django REST Framework — to update the error response message
React.js — to display the formatted message correctly on screen

Testing:

Trigger the block by entering wrong credentials multiple times
Verify the blocking message shows the date in readable format
Check the message is grammatically correct and makes sense to a regular user
Test on both mobile and desktop
Test on both password and OTP login modes

Mockups/Wireframes

No response

Product Name

.

Domain

No response

Tech Skills Needed

Python, Django, React

Mentor(s)

.

Complexity

Low

Category

Backend

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions