#32523: Warn when trying to use a widget as a field in a form
----------------------------------+--------------------------------------
Reporter: Anders Hovmöller | Owner: nobody
Type: New feature | Status: closed
Component: Forms | Version: 3.1
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Comment (by Anders Hovmöller):
> More appropriate for a system check than a runtime warning however.
How would that work? If someone defines a form inside a view function or a
get_form() method, that can't really be checked from a system check right?
> DEBUG
Doing this check in DEBUG mode only makes sense to me. Would you be
willing to accept such a change to the PR?
> There is a balance between being helpful and adding checks for every
potential mis-use/mis-configuration that we're constantly trying to walk.
Well... might I then suggest removing the super slow model verification
the runserver does by default then? :) I am thinking of writing a PR to at
least move that to a different thread or something so it doesn't make
development so slow.
> Often we say that many checks better belong in user projects.
I disagree with that sentiment when it's a common use case that is mostly
hit by beginners who are not competent enough yet to even write such
checks.
Could we maybe have had this discussion before the ticket was closed btw?
It seems strange to do it this way...
--
Ticket URL: <https://code.djangoproject.com/ticket/32523#comment:2>
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/063.581f7f694f9ac770994bf4f7b0c17c4c%40djangoproject.com.