Skip to content

Instantly share code, notes, and snippets.

@archatas
Last active July 11, 2017 18:42
Show Gist options
  • Save archatas/846ff4eba5472baaa02d6fe7fb340169 to your computer and use it in GitHub Desktop.
Save archatas/846ff4eba5472baaa02d6fe7fb340169 to your computer and use it in GitHub Desktop.
Avoid listing HTML attribute values within translatable string in Django template
{% blocktrans with username=request.user.username link=request.user.get_url_path css_class="btn btn-link" %}
Hello <a href="{{ link }}" class="{{ css_class }}">{{ username }}</a>!
{% endblocktrans %}
@Copser
Copy link

Copser commented Jul 11, 2017

Yea exactly, like I said, you could put it into plain Bootstrap, it should work, not that I want to disparage the designer work, we all love good design, but he should not be stressed about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment