diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index b47c13ca..0cf22f23 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ diff --git a/osinaweb/osinacore/__pycache__/custom_context.cpython-310.pyc b/osinaweb/osinacore/__pycache__/custom_context.cpython-310.pyc index 358d63f7..63c1e8bd 100644 Binary files a/osinaweb/osinacore/__pycache__/custom_context.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/custom_context.cpython-310.pyc differ diff --git a/osinaweb/osinacore/custom_context.py b/osinaweb/osinacore/custom_context.py index 4764210c..c4c791a3 100644 --- a/osinaweb/osinacore/custom_context.py +++ b/osinaweb/osinacore/custom_context.py @@ -86,7 +86,7 @@ def utilities(request): ticket.unread_updates_count = unread_updates_count - today = datetime.now().date() + today = timezone.now() latest_statuses = Status.objects.filter(date_time__date=today).order_by('-id') last_status = Status.objects.filter(staff=request.user.staffprofile).last() @@ -111,5 +111,6 @@ def utilities(request): 'recent_logged_in_staffs' : recent_logged_in_staffs, 'recent_logged_in_customers' : recent_logged_in_customers, 'open_tickets': open_tickets, - 'closed_tickets': closed_tickets + 'closed_tickets': closed_tickets, + 'today': today, } \ No newline at end of file diff --git a/osinaweb/osinacore/templates/recent-status.html b/osinaweb/osinacore/templates/recent-status.html index 541a43e3..1ed0b3be 100644 --- a/osinaweb/osinacore/templates/recent-status.html +++ b/osinaweb/osinacore/templates/recent-status.html @@ -5,8 +5,8 @@ {{last_status.text}}

Last update: - {% if last_status.date == current_date %} - {% if last_status.time_ago == '0min ago' %} + {% if last_status.date_time.date|date:"Y-m-d" == today|date:"Y-m-d" %} + {% if last_status.time_ago == '0min ago' %} Just Now {% else %} Today | {{last_status.time_ago}}