title: django.urls.exceptions.NoReverseMatch: Reverse for 'Professors' with arguments '(1, 5)' not found
body: <p>I'm trying to filter my professor table to display the professors that correspond to a specific school and specific major, the parameters are showing up in the error message, I just don't understand why there is a error message at all.</p>
  
  <p>Views.py</p>
  
  <pre><code>from django.http import HttpResponse
  from django.shortcuts import render
  from .models import professor, School, Major, School_Major
  
  def index(request):
      schools = School.objects.all()
      return render(request, 'locate/index.html', {'schools': schools})
  
  
  # def Major(request, Major):
  #   major_choice = professor.objects.filter(Major =Major)
  #   return render(request, 'locate/major.html', {'major_choice': major_choice})
  
  def Majors(request, school_pk):
      schools_majors_ids = []
      major_after_filter = []
  
      #Filter to a show the association of 1 schools majors
      school_choice = School_Major.objects.filter(school_id = school_pk)
  
      #Append each of the major id's to school_majors_ids list
      for store in school_choice:
          schools_majors_ids.append(store.major_id)
  
      #Filter majors names required
      for store in schools_majors_ids:
          name = Major.objects.get(id = store)
          major_after_filter.append(name)
      return render(request, 'locate/major.html', {'major_after_filter' : major_after_filter,
                                                   'school_pk' : school_pk})
  
  def Professors(request, school_pk, major_pk):
      professors = professors.objects.filter(school_id = school_pk).filter(major_id = major_pk)
      return render(request, 'locate/professors', {'professors' : professors})
  </code></pre>
  
  <p>url.py</p>
  
  <pre><code>from django.urls import path
  
  from . import views
  
  
  urlpatterns = [
      path('', views.index, name='index'),
      path(' &lt;int:school_pk&gt;/', views.Majors, name='Major'),
      path(' &lt;int:school_pk/&lt;int:major_pk&gt;/', views.Professors, name="Professors")
  ]
  </code></pre>
  
  <p>majors.html</p>
  
  <pre><code>&lt;h3 id="test"&gt;{{school_pk}}&lt;/h3&gt;
              &lt;ul&gt;
                  {% for major in major_after_filter %}
  
                  &lt;li&gt;&lt;a href="{% url 'Professors' school_pk major.id %}"&gt;{{major.name}}&lt;/a&gt;&lt;/li&gt;
  
                  {%endfor%}
              &lt;/ul&gt;
  </code></pre>
  
  <p>I needed a way to place the value of the schools primary key, as well as the majors primary key as parameters for the Professor view function to be able to filter down the professor table in order to display the correct majors.</p>
  
  <p>When I leave school_pk as seen below</p>
  
  <p>I get the following error</p>
  
  <pre><code>django.urls.exceptions.NoReverseMatch: Reverse for 'Professors' with arguments '(1, 5)' not found. 1 pattern(s) tried: ['locate/\\ &lt;int:school_pk/(?P&lt;major_pk&gt;[0-9]+)/$']
  </code></pre>
  
  <p>When I remove the school_pk like below</p>
  
  <pre><code>&lt;li&gt;&lt;a href="{% url 'Professors' major.id %}"&gt;{{major.name}}&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>I get this error</p>
  
  <pre><code>TypeError: Professors() missing 1 required positional argument: 'school_pk'
  </code></pre>
  
  <p>Which makes sense because the professor function requires a school_pk parameter (<strong>Note that the variable used in the html and parameter are named the same sorry if that seems confusing</strong>).</p>