On Thu, Apr 3, 2014, Carl <[email protected]> wrote:

>As someone said earlier in the thread, making Python programmers deal with 
>long lines seems like some special form of torture ;)

My own use case is this:

{% with placeholder_width=960 generic_main_width=523 
sidebar_image_size="294x196" entity_image_size="445x384" 
entity_map_size="445x100" person_map_size="445x100" sidebar_map_size="296x100" 
person_image_size="460x460" person_thumbnail_size="40x40" 
lightbox_max_dimension=600 plugin_thumbnail_size="75x75" 
place_image_size="627x418" place_map_size="294x182" body_heading_level=2 %}

Now that's very horrible to read.

This would be much nicer:

{% with 
    placeholder_width=960 
    generic_main_width=523 
    sidebar_image_size="294x196" 
    entity_image_size="445x384" 
    entity_map_size="445x100" 
    person_map_size="445x100" 
    sidebar_map_size="296x100" 
    person_image_size="460x460" 
    person_thumbnail_size="40x40" 
    lightbox_max_dimension=600 
    plugin_thumbnail_size="75x75" 
    place_image_size="627x418" 
    place_map_size="294x182" 
    body_heading_level=2 
%}

And yes, there is a good reason for wanting to use {% with %} in this way!

Daniele

-- 
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/20140403141333.1946415207%40smtpauth.cf.ac.uk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to