On 10 Sty, 12:59, Andreas Pfrengle <a.pfren...@gmail.com> wrote:
> I'm having a template, where a link shall be inside a translation-
> marked text. I see two ways how to accomplish this, but both don't
> work:
> 1. {% trans "You need to <a href="{% url login %}">login</a> before
> you can do anything" %}
(...)
> 2. {% blocktrans %}You need to <a href="{% url login %}">login</a>
> before you can do anything {% endblocktrans %}
(...)
>
> Is there a way with either of these tags to accomplish what I want?
>

I haven't tried this but maybe it will work:

{% url login as login_url %}
{% blocktrans %}You need to <a href="{{login_url}}">login</a> before
you can do anything {% endblocktrans %}

I'm curious if this is good guess, so please let me know.

--
Tomasz Zielinski
http://pyconsultant.eu
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to