Thank you

On Sun, May 19, 2024, 1:48 AM Hossein Mahdavipour <hosseinm...@gmail.com>
wrote:

> 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."
> You can see the code here:
> https://github.com/django/django/blob/8f205acea94e93a463109e08814f78c09307f2b9/django/shortcuts.py#L88
> 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.
>
> --
> 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+unsubscr...@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
> <https://groups.google.com/d/msgid/django-users/d1b93300-9f52-4c24-9ab9-dcfc5038200bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHZhoBOGYXm6qdKJRtpWFVHPdods3FQDQotbJMdY7A-9KudMsA%40mail.gmail.com.

Reply via email to