Hi Jannis,

On Wed, Nov 3, 2010 at 3:03 PM, Jannis Leidel <jan...@leidel.info> wrote:
> On 27.10.2010, at 09:46, SmileyChris wrote:
>
>> On Oct 27, 5:35 am, Łukasz Rekucki <lreku...@gmail.com> wrote:
>>> I would like to bring this up again, because this is something that
>>> would really improve readability of my templates. I'm mainly
>>> interested in ticket #7817 (the include tag changes), but extending
>>> "with" tag (ticket 9456) would keep things consistent.
>>
>> Here's a link to the ticket for the lazier ones among us:
>> http://code.djangoproject.com/ticket/7817
>>
>> The main decision which needs to be made is one of syntax.
>>
>> The current proposal uses:
>> {% include "name_snippet.html" with name="Joe" greeting="Hello" %}
>> but this introduces an inconsistency with the {% with %} tag.
>
> I'm feeling strongly against moving from the "value as name" to the 
> "name=value" notation, since I think the former is actually more readable 
> than the latter for the targetted audience (template authors).

If you are not asking real people, it's a speculation anyway.

I'm also target audience (since I write initial Django templates
structure for HTML from designer), even though I'm a programmer.
I think there are even more programmers than designers that use django
templates.
Our designer don't care at all, because she will just use any solution
to do her job.
So of two people, one voted for "=", second abstained from voting.

I think for most people "=" is slightly better than "as" because:
 - All of them had math classes at school and they know "=" already.
 - Not every Django template author knows English.

"Slightly" because:
   - they have to spend some minutes to understand "how the tag works"
anyway, and it's much more time than they would think of "what does
'=' do here" or "what does 'as' means here".
   - they just don't care. they didn't choose html, they didn't choose
css, they didn't choose django templates. it's so minor question.

Why I'm for "=":

I think, "and" + "as" are too verbose for this regular task.
They just make fast scanning through the template seeking for some
variables much harder and don't help at all.

>> Consistency would be nice, but I think this starts to look a bit
>> confusing, static tokens outnumbering actual functional ones:
>> {% include "name_snippet.html" with name as "Joe" and greeting as
>> "Hello" %}
>
> Well, I think that's actually not a bad notation at all (if using the correct 
> order :), so for #7817 I propose the following syntax (as analogously 
> proposed by #9456 for {% with %}):
>
> {% include "name_snippet.html" with "Joe" as name and "Hello" as greeting %}
>
>
> Jannis
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django developers" group.
> To post to this group, send email to django-develop...@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.
>
>



-- 
Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov,
MSN: bu...@live.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@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