#26748: Custom widget on JSONField in contrib.postgres: simplification
----------------------------------+-----------------
     Reporter:  meshy             |      Owner:
         Type:  Uncategorized     |     Status:  new
    Component:  contrib.postgres  |    Version:  1.9
     Severity:  Normal            |   Keywords:
 Triage Stage:  Unreviewed        |  Has patch:  1
Easy pickings:  1                 |      UI/UX:  0
----------------------------------+-----------------
 On normal form fields, one can customise the widget with an attribute of
 the field. eg:

 {{{
 class CoffeeField(django.forms.CharField):
     widget = CoffeeWidget

 >>> CoffeeField().widget
 <CoffeeWidget object at 0xc0ffeec0ffee>
 }}}

 However, with `contrib.postgres.forms.jsonb.JSONField` this doesn't work.
 Instead, once must override `__init__()` or pass `widget` in as a kwarg.


 Luckily, it's pretty easy to fix, and I've almost completed writing a
 patch. I'll link to it here once done.

--
Ticket URL: <https://code.djangoproject.com/ticket/26748>
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/048.446ca3fa967466935eeb96daccc950ca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to