You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's hard to describe my problem in summary, so i do it in example
I want to get html with div with img inside. Sometimes I want to assign one class to div tag, sometimes another. So i end up django-hamlpy template like this:
But I don't like %img{'src': '={ image_obj.url }'} copypaste in both blocks. It wasn't a problem with simple django tags, because there is endif tag and indents means nothing, but now i can't see how to do it in my new template scheme. How can i write django-haml markup without repeating tag content?
Maybe one just can't do something like that using indent-sensitive language and i should fallback to simple django tags, i still can use them as-is, right?
The text was updated successfully, but these errors were encountered:
It's hard to describe my problem in summary, so i do it in example
I want to get html with
div
withimg
inside. Sometimes I want to assign one class todiv
tag, sometimesanother
. So i end up django-hamlpy template like this:But I don't like
%img{'src': '={ image_obj.url }'}
copypaste in both blocks. It wasn't a problem with simple django tags, because there isendif
tag and indents means nothing, but now i can't see how to do it in my new template scheme. How can i write django-haml markup without repeating tag content?Maybe one just can't do something like that using indent-sensitive language and i should fallback to simple django tags, i still can use them as-is, right?
The text was updated successfully, but these errors were encountered: