#33372: GISModelAdmin.gis_widget_kwargs cannot be used due to signature
mismatch.
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Alexander
| Filimonov
Type: Bug | Status: closed
Component: GIS | Version: 4.0
Severity: Normal | Resolution: invalid
Keywords: gismodeladmin, | Triage Stage:
gis_widget_kwargs | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Alexander Filimonov):
Replying to [comment:4 Nick Pope]:
> Replying to [comment:3 Mariusz Felisiak]:
> > I wouldn't say it's broken, you can set `gis_widget_kwargs = {'attrs':
{...}}`. Defining widgets with more than `attrs` or a different signature
is reasonable (e.g. `SplitDateTimeWidget` or `ChoiceWidget`). IMO we
should leave wide support for all options.
>
> I see. That makes sense, but I can also see that it is confusing.
> Perhaps the documentation can be updated with an example? (If only to
avoid reports of this in the future.)
> In addition, this is not tested - it should be to ensure that
`gis_widget_kwargs` continues to work as expected.
I'd support Nick here and say that it is not a good way to use a
dictionary to fill a single attribute.
I have a fix for this with a test to check if arguments are passed
correctly
https://github.com/django/django/pull/15211
Please review the pull request
--
Ticket URL: <https://code.djangoproject.com/ticket/33372#comment:6>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.730127fea63e57890f5897be331ee27b%40djangoproject.com.