title: passing a parameter from html page url mapping to the views in django
body: <p><strong>front.html</strong></p>
  
  <pre><code>&lt;div class="row"&gt;
     &lt;a href="{% url 'emp_pay_list' Information_technology %}"&gt;
        &lt;div class="col-md-6 col-sm-6 col-lg-3"&gt;
          &lt;div class="dash-widget clearfix card-box" style="height: 200px;"&gt;
              &lt;span class="dash-widget-icon"&gt;&lt;i class="fa fa-cubes" aria-hidden="true"&gt;&lt;/i&gt;&lt;/span&gt;
              &lt;div class="dash-widget-info"&gt;
                  &lt;h3&gt;20&lt;/h3&gt;
                  &lt;span&gt;Information Technology&lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
     &lt;/a&gt;
  
     &lt;a href="{% url 'emp_pay_list' sales %}"&gt;
         &lt;div class="col-md-6 col-sm-6 col-lg-3"&gt;
            &lt;div class="dash-widget clearfix card-box" style="height: 200px;"&gt;
                &lt;span class="dash-widget-icon"&gt;&lt;i class="fa fa-users" aria-hidden="true"&gt;&lt;/i&gt;&lt;/span&gt;
                &lt;div class="dash-widget-info"&gt;
                   &lt;h3&gt;7&lt;/h3&gt;
                    &lt;span&gt;Sales Team&lt;/span&gt;
                &lt;/div&gt;
            &lt;/div&gt;
         &lt;/div&gt;
      &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The above code is the front end part HTML here I want to pass a parameter into the urls.py by clicking a box and depends on the parameter which we pass the data should be fetched.</p>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>url(r'^list_of_employees/&lt;string&gt;/$', views.Pay_slip_list , name='emp_pay_list'),
  </code></pre>
  
  <p>This is the code which I am using in urls.py to pass parameter.</p>
  
  <p>views.py</p>
  
  <pre><code>def Pay_slip_list(request, department):
      hello = employees.objects.select_related('employee_name', 'employee_auth').filter(department=department)
      return render(request, 'hr/emp_pay_list.html', {'hello': hello})
  </code></pre>
  
  <p>And this is the views.py part where I am fetching data from the database based on the string/parameter passed after clicking the box.</p>