title: NoReverseMatch: Redirect to a new page in Django with a query from a template
body: <p>I want to redirect from inside my HTML Template to a new page and also pass a query to that page as a GET request query.</p>
  <p>The HTML code looks like this.</p>
  <pre><code>&lt;th scope=&quot;row&quot;&gt;{{ forloop.counter }}&lt;/th&gt;
  &lt;td&gt;{{ project.article_title }}&lt;/td&gt;
  &lt;td&gt;{{ project.target_language }}&lt;/td&gt;
  &lt;td&gt; &lt;a href=&quot;{% url 'translation/{{project.id}}/' %}&quot; class=&quot;btn btn-success&quot;&gt;View Project&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  <p>This doesn't redirect and I get the following error.</p>
  <pre><code>NoReverseMatch at /manager/
  Reverse for 'translation/{{project.id}}/' not found. 'translation/{{project.id}}/' is not a valid view function or pattern name.
  </code></pre>
  <p>My URL pattern looks like this</p>
  <pre><code>urlpatterns = [
      path('', views.project_input_view, name='main'),
      path('login/', views.login_user, name='login'),
      # path('register/', views.register_user, name='register'),
      path('translation/&lt;str:pk&gt;/', views.translation_view, name='translation'),
      path('manager/', views.manager_view, name='manager_dashboard'),
      path('annotator/', views.annot_dashboard_view, name='annot_dashboard'),
  ]
  </code></pre>
  <p>However, if I write the following then it works.</p>
  <pre><code>&lt;th scope=&quot;row&quot;&gt;{{ forloop.counter }}&lt;/th&gt;
  &lt;td&gt;{{ project.article_title }}&lt;/td&gt;
  &lt;td&gt;{{ project.target_language }}&lt;/td&gt;
  &lt;td&gt; &lt;a href=&quot;{% url 'main' %}&quot; class=&quot;btn btn-success&quot;&gt;View Project&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  <p>but I want to redirect to the <code>translation</code> page along with the query. How can I achieve that?</p>