Django use URL tag in template from app specific urls?
<p>I have the following URLs in my project <code>urls.py</code></p>

<pre><code>urlpatterns = i18n_patterns(
    url(r'^register/', include('register.urls')),
)
</code></pre>

<p>So I maintain urls in the register app, so the <code>urls.py</code> in my <code>register</code> app looks like this:</p>

<pre><code>urlpatterns = patterns(
    url(r'^test/$', views.Test, name="register_test"),
)
</code></pre>

<p>So I have a template that is located outside the register app, is located in the root of the project, and I am trying to use the above url like this:</p>

<pre><code>&lt;a href="{% url 'register_test' %}"/&gt;Test&lt;/a&gt;
</code></pre>

<p>But I get the following error:</p>

<pre><code>NoReverseMatch at /en/
Reverse for 'register_test' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
</code></pre>

<p>project urls.py</p>

<pre><code>urlpatterns = i18n_patterns(
    url(r'^register/', include('register.urls', namespace="register")),
)
</code></pre>

<p>app urls.py</p>

<pre><code>urlpatterns = patterns(
    url(r'^test/$', views.Test, name="register_test"),
)
</code></pre>

<p>template.html</p>

<pre><code>&lt;a href="{% url 'register:register_test' %}"/&gt;Test&lt;/a&gt;
</code></pre>

python django url