#28526: Remedy verbose, often unhelpful undefined template variable logging
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Mankameshwar Mishra):
Thanks for the question.
My understanding is that the current logging for undefined template
variables can be very verbose and sometimes confusing, especially in cases
where missing variables are expected (e.g., optional template context
variables).
My proposal is to improve this by making the logging less noisy. For
example, we could avoid logging repeated messages for the same undefined
variable within a single template render, or adjust the message so it is
clearer and more actionable for developers.
I will first investigate where the logging is triggered in the template
engine and propose a minimal change that reduces unnecessary verbosity
while keeping useful debugging information.
Please let me know if this approach sounds reasonable.
--
Ticket URL: <https://code.djangoproject.com/ticket/28526#comment:14>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019cc999c889-f454a041-be12-4f84-9a29-eca9516357ee-000000%40eu-central-1.amazonses.com.