DEV Community

loading...

Discussion on: Six Django template tags not often used in tutorials

Collapse
hundredrab profile image
100

Great post! BTW, you can use braces here like this


```html
{% widthratio this_value max_value max_width as width %}
{% blocktrans %}The width is: {{ width }}{% endblocktrans %}
```

Which will render as expected:

{% widthratio this_value max_value max_width as width %}
{% blocktrans %}The width is: {{ width }}{% endblocktrans %}