54👍
✅
Use {% blocktrans %}
. The Django translation docs include this example:
{% url path.to.view arg arg2 as the_url %}
{% blocktrans %}
This is a URL: {{ the_url }}
{% endblocktrans %}
1👍
This works for me:
{% url "app-name:name-of-view" as the_url %}
{% blocktrans %}
This is a URL: {{ the_url }}
{% endblocktrans %}
👤Ming
- [Django]-Access Django models with scrapy: defining path to Django project
- [Django]-How to set NULL for IntegerField instead of setting 0?
- [Django]-NoReverseMatch while rendering: Reverse for ''django.contrib.auth.views.login''
Source:stackexchange.com