#35716: Undefined template variables on Admin's add page templates when using
fieldsets
-------------------------------------+-------------------------------------
Reporter: Fábio Domingues | Owner: Sarah
Type: | Boyce
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: 5.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Adam Johnson):
> (Adam, I'm adding you as cc since you added yourself to #28526.)
Thanks :)
Honestly, I think the `string_if_invalid` feature brings more pain than
it’s worth, after investigating it a bit for a client last year. You can
see all the ways that I found it goes wrong in
[https://adamj.eu/tech/2023/08/09/django-perils-string-if-invalid/ this
blog post].
I’d still be happy for small template changes to let it keep “working”.
But in the long run, I think it would be better for Django to deprecate
`string_if_invalid` and use a Jinja-style “undefined variable class”, as I
hinted at in the conclusion of that post.
--
Ticket URL: <https://code.djangoproject.com/ticket/35716#comment:5>
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/010701919fe867a0-8e2fe6db-372a-4625-9c62-c2b4878ebd2c-000000%40eu-central-1.amazonses.com.