Hi Chris,
2011/6/29 Chris Beaven :
>>
>> I think thats conceptually not possible. We simply can change the widget
>> during
>> template rendering time, which makes it impossible to decide in the python
>> code with which widget we end up. And theoretically we could even render
>> the
>> form twice
On Thu, Jul 7, 2011 at 8:37 PM, Tai Lee wrote:
> The docs say that when writing custom template tags, the `render()`
> function should never raise `TemplateSyntaxError`, [...]
This rule is the correct one, and I'm very much against changing it.
> [...] but some of Django's own template tags (e.g
Something related I was wondering about...
Errors in templates should be silenced -- I agree with that -- but
only when they are caused by an error in the template.
Variable.resolve can fail silent because that's caused by the template
author, who is referring to non-existing variables.
However,
On 07/08/2011 05:24 PM, Jonathan Slenders wrote:
My feeling is that we should silence TypeError, AttributeError and
KeyError in _resolve_lookup, but only when they occur one frame deep.
I agree with what you propose but AFAIK it's not easy to solve without
doing frame analysis (I'd say that fe
On Saturday, July 9, 2011 12:19:44 AM UTC+12, Gregor Müllegger wrote:
>
> [...] So we decided to skip changing a widget totally in the form
> rendering.
> Displaying a form and anything else that happens in the template has a
> representational purpose, so we saw it would be out of scope for the
Hi Chris,
On 07/08/2011 04:00 PM, Chris Beaven wrote:
> On Saturday, July 9, 2011 12:19:44 AM UTC+12, Gregor Müllegger wrote:
> [...] So we decided to skip changing a widget totally in the form
> rendering.
> Displaying a form and anything else that happens in the template has a
>
On Jul 8, 11:31 pm, Jacob Kaplan-Moss wrote:
> > [...] but some of Django's own template tags (e.g. `widthratio`) don't
> > adhere to
> > this policy.
>
> These are bugs, and should be fixed.
Thanks for this clarification. I will try to review the built-in tags
and submit some patches to fix t
On Fri, Jul 8, 2011 at 9:55 PM, Tai Lee wrote:
> Secondly, there is the inconsistent behaviour between production and
> development environments related to the `TEMPLATE_DEBUG` setting. I
> think that if an exception is intentionally silenced in production, it
> should also be intentionally silen
On Jul 9, 12:24 pm, Karen Tracey wrote:
> I'm strongly against that idea. Swallowing errors makes it incredibly
> difficult to debug errors. I would prefer for the `TEMPLATE_DEBUG` setting to
> turn off much of the error-silencing currently done in template processing.
> Yes, that means differen