why get_object_or_404 error is not using translation?

47 views
Skip to first unread message

Hossein Mahdavipour

unread,
May 18, 2024, 4:18:52 PMMay 18
to Django users
Hi.
I am using DRF with django. In views  I use get_object_or_404. When I get a 404, the exception detail is "No %s matches the given query."
My question is why it does not use translation? I searched the web but I found nothing on why it does not use translation.
Also I like to know, how can I use a workaround to get a translated error when getting 404 without try except in all views.

Thanks in advanced.

Natraj Kavander

unread,
May 19, 2024, 10:02:22 PMMay 19
to django...@googlegroups.com
Thank you 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d1b93300-9f52-4c24-9ab9-dcfc5038200bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages