Open jonasN5 opened 1 month ago
I'm experiencing the same issue, were you able to resolve it?
I'm experiencing the same issue, were you able to resolve it?
So far i'm stuck with silencing the logs.
I'm able to reproduce this with when DEBUG is True (but not when it is False). But yes, if we try to resolve a variable which does not exist an exception is thrown. But that's intended behaviour, isn't it?
https://docs.djangoproject.com/en/5.1/ref/templates/api/#how-invalid-variables-are-handled
Well in that case we should not try to get invalid variables in DEBUG. I don't think logging a bunch of exceptions simply because DEBUG is set to true is acceptable.
Seems acceptable to me, but I see your point. So if someone wants to send a pull-request, we'll take a look at it.
When accessing the admin page, we currently have a bunch of errors logged:
This currently happens in a completely new project with nothing installed and no code. All I did was install grappelli. Without grappelli, no error is logged.
Settings:
It doesn't look like it's breaking anything but it's clogging our logs and besides, having lingering exceptions is never a good thing.
Ofc, adding the following silences the exceptions since they are at the DEBUG level:
Still, I would prefer not having to silence the template errors altogether just because I'm using the grappelli package.