title: Django & Jinja2 templates using {{ url() }}
body: <p>I am trying to figure out how to pass my user_id within my html using jinja's {{ url() }}, using urls that don't need any id like <code>/dashboard/</code> work fine but I need to pass an id to this- example: <code>/user/3</code> . I have tried the following with no success:</p>
  
  <pre><code>{{ url('detail') }}
  {{ url('detail', user_id=User.id) }}
  {{ url('detail', User.id) }}
  </code></pre>
  
  <p>Here's part of my views and html:</p>
  
  <p>views.py</p>
  
  <pre><code>urlpatterns = [
      path('dashboard/', dashboard, name='dashboard'),          
      path('user/&lt;int:user_id&gt;/', detail, name='detail'),    
  ]
  </code></pre>
  
  <p>dashboard.html</p>
  
  <pre><code>{% for User in all_users %}
  
      {{ url('detail') }}
  
  {% endfor %}
  </code></pre>
  
  <p>Any help on this would be appreciated, thanks</p>