I think regardless of our personal preferences on the aesthetics on
template tags, the final decision to split them in multiple lines should be
made by users.

If there are no cons in implementing such a change and the patch really is
only six characters long, then it seems like a no-brainer to allow others
to write their code as it pleases them. This doesn't mean we'll be seeing
multi-line tags right and left, but rather that we are empowering our users
with the choice a subtle yet useful feature that brings no
incompatibilities to current Django deployments, and does not impact
performance negatively.

As it stands, both Python and HTML allow developers to write multi-line
statements, so, by analogy, it's only logical that Django would follow suit.



Cheers,
AT


On Tue, Feb 21, 2012 at 12:34 PM, Michael Elsdörfer <elsdoer...@gmail.com>wrote:

> Not to harp on about this, but I never understood not supporting multi-
> line tags, in particular if it doesn't affect performance and really
> is as straightforward as suggested by the OP.
>
> Yes, they are only useful in a limited set of cases (albeit "rare" may
> be overstating it), but so are multi-line statements in Python. But
> when you do need them, this is not something that can simply be
> provided by a third party extension. And it's not like we cannot trust
> developers to not uglify templates by wrapping at every whitespace.
> Most tags will continue to be single-line statements and will be as
> readable as ever.
>
> Admittedly, I like to wrap early, due to vertical splitting, and if
> you have some indentation and a filter with an argument, I have to
> start scrolling vertically rather quickly.
>
> Looking at the {% comment %} tag, not only do I not see now it is more
> readable than a multi-line {# #}, it also feels decidedly like a
> workaround to me, which tells me that the thing being worked around
> should be fixed.
>
> Michael
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To post to this group, send email to django-developers@googlegroups.com.
> To unsubscribe from this group, send email to
> django-developers+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to