#17664: {% if %} template tag silences exceptions inconsistently
-------------------------------------+-------------------------------------
Reporter: Tai Lee | Owner: Robert
| Roskam
Type: Bug | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: smart if tag | Triage Stage: Accepted
queryset exception silenced |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Robert Roskam):
So I realize that I may have buried the lead in my previous post:
"As best as I can tell, these are being totally consistent with their
design intent. That is to say, they're operating exactly like the docs say
they should. If we don't like the fact that a raises an error and not a
doesn't, then I think we should make a deliberate design decision."
And then I gave 2 options, but I'm going to just focus on one of them: I
think the choice to let boolean operations silence assertions was a
mistake. I think we should change this.
We can't change the interface and offer a different "if" statement, so
this is a breaking change, since some projects may have been relying on
this behavior. So the intermediate step might be to raise a warning in the
console for a minor version that exceptions will stopped being coerced to
False soon.
Thoughts?
--
Ticket URL: <https://code.djangoproject.com/ticket/17664#comment:22>
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/067.76001f04e5feb9fb8ed955425bb25152%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.