On 11 February 2014 12:31, Luke Sneeringer <[email protected]> wrote:

> On Feb 10, 2014, at 12:16 PM, Carl Meyer <[email protected]> wrote:
>
> It's a problem that we are unable to do things
> that would otherwise be no-brainers (e.g. rendering form widgets using
> templates rather than by concatenating strings of HTML in Python code)
> because our default templating language is too slow.
>
>
> The deliberate hobbling aspect also makes situations like this that should
> be no-brainers into painful slogs. Form widgets are a great example beyond
> this, too, because customizing HTML for particular form elements (e.g.
> adding size="30" to one input field) is an absolute pain. The blessed way
> involves overwriting the field, which requires copying every single
> relevant attribute of the model (and then double-maintaining changes).
>
> The Flask extension's mechanism is {{ field(size=30) }}. Done.
>
> And under this example, it's *DTL* that pushes you to put that logic in
> the wrong place; it doesn't belong in a forms.py file in most places. I've
> even seen cases where the only reason an explicit form *exists* is to
> make small template-level changes.
>
>
>From my own experience [writing formulation] I think it _can_ be easy to
write efficient template-level form rendering, with the right
pre-processing on the form/field objects.  So once again the issue comes
back to "it's not entirely the language, but the objects you pass it."

Just my 2c.

--
Curtis

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAG_XiSC7%2B%3Ddnmgzr%3D52%2BQw2rd3gAMUqwGv-DK5cOfhFoEc4faA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to