How to reference Django application url in admin index template
<p>I'm currently making changes to the admin/index.html template and I need to reference the url in my application using the name space 'hello' in a href tag for a link, but I'm having trouble doing at the admin level.  The name of my application is clean and the url pattern in urls.py file is below.</p>

<pre><code>urls.py

from django.conf.urls import url, include
from . import views

urlpatterns = [
  url(r'^HelloWorld/$', views.hello, name='hello'),
  ]
</code></pre>

<p>I'm trying to avoid hard coding the below href tag in admin/index.html.  Any suggestions would be a great help
<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
&lt;h3&gt;Hello World&lt;/h3&gt;
&lt;a href="http://127.0.0.1:8000/clean/HelloWorld"&gt;Test&lt;/a&gt;
&lt;/div&gt;</code></pre>
</div>
</div>
</p>

<p>You can simply use:</p>

<pre><code>&lt;div&gt;
    &lt;h3&gt;Hello World&lt;/h3&gt;
    &lt;a href="{% url 'hello' %}"&gt;Test&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>Django provides the ability to "reverse" URLs (i.e. provided the name of the URL, and arguments if necessary, the actual URL is generated) in order to avoid such hardcoding.You can read more about URL reversing in the official docs <a href="https://docs.djangoproject.com/en/1.10/topics/http/urls/#reverse-resolution-of-urls" rel="nofollow">here</a>.</p>

python html django