-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Description
Checklist
- [ x] I have verified that that issue exists against the
masterbranch of Django REST framework. - [ x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [ x] This is not a usage question. (Those should be directed to the discussion group instead.)
- [ x] This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
- [ x] I have reduced the issue to the simplest possible case.
- I have included a failing test as a pull request. (If you are unable to do so we can still accept the issue.)
Due to django docs for lazy objects format_lazy method should be called instead of str.format.
https://docs.djangoproject.com/en/3.1/topics/i18n/translation/#formatting-strings-format-lazy
because in serializers instead of lazy objects, str objects are passed to Exception initiation, I can't access lazy objects in exception handler.
for example in this part that it seems a little wrong
| message = self.message.format(field_names=field_names) |
Thanks
Metadata
Metadata
Assignees
Labels
No labels