#27688: Django message framework add_message() should prefer ducktyping over
isinstance
--------------------------------------------+--------------------------
Reporter: Raffaele Salmaso | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.messages | Version: master
Severity: Normal | Keywords: messages
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+--------------------------
Original ticket https://code.djangoproject.com/ticket/21412
django.contrib.messages.add_message check for an HttpRequest object
instance, and cannot work as-is with django-rest-framework request
wrapper, requiring to use the wrapped object directly
{{{
messages.add_message(request._request, ...)
}}}
add_message() should not use `isinstance` check.
--
Ticket URL: <https://code.djangoproject.com/ticket/27688>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.d2c4bf713a1c1a9f26c8efca0e3967af%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.