Example condition:
`is_member = user.is_authenticated and user.<custom_method>`
If user is authenticated, value of `is_member` depends on the return value
of `custom_method`.
If user is anonymous, `CallableFalse` is passed to `JsonResponse` and
raises `TypeError`.
--
Ticket URL: <https://code.djangoproject.com/ticket/28230>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* type: Uncategorized => Cleanup/optimization
* has_patch: 0 => 1
* component: Uncategorized => Core (Serialization)
* stage: Unreviewed => Ready for checkin
Comment:
The [https://github.com/django/django/pull/8532 PR] looks good pending a
few cosmetic updates.
--
Ticket URL: <https://code.djangoproject.com/ticket/28230#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"d1d08d86baef05db5b37c266ed9142f1c57e6322" d1d08d86]:
{{{
#!CommitTicketReference repository=""
revision="d1d08d86baef05db5b37c266ed9142f1c57e6322"
[1.11.x] Fixed #28230 -- Allowed DjangoJsonEncoder to serialize
CallableBool.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28230#comment:2>
Comment (by Tim Graham <timograham@…>):
In [changeset:"5dc6f77423084dd7c99549b1e477ee573802f5a4" 5dc6f77]:
{{{
#!CommitTicketReference repository=""
revision="5dc6f77423084dd7c99549b1e477ee573802f5a4"
Refs #28230 -- Forwardported 1.11.2 release note.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28230#comment:3>