why get_object_or_404 error is not using translation?

閲覧: 47 回
最初の未読メッセージにスキップ

Hossein Mahdavipour

未読、
2024/05/18 16:18:525月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

未読、
2024/05/19 22:02:225月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.
全員に返信
投稿者に返信
転送
新着メール 0 件