title: I tried to redirect the url path to the detail view in django
body: <p>I am new in django. I want to redirect the url into the detail view but the path in urls.py is not working. </p>
  
  <p><strong>this is urls.py</strong></p>
  
  <pre><code>from django.urls import path, include
  from basic_app import views
  
  app_name = 'basic_app'
  urlpatterns = [
  path('', views.SchoolListView.as_view(), name='list'),
  path('&lt;school.id&gt;', views.SchoolDetailView.as_view(),name='detail'),
  ]
  </code></pre>
  
  <p><strong>this is my views.py</strong></p>
  
  <pre><code>from django.shortcuts import render
  from django.views.generic import (View, TemplateView,
                                DetailView, ListView)
  from . import models
  
  
  class IndexView(TemplateView):
  template_name = 'index.html'
  
  
  class SchoolListView(ListView):
  context_object_name = 'schools'
  model = models.School
  
  
  class SchoolDetailView(DetailView):
  context_object_name = 'school_detail'
  model = models.School
  template_name = 'basic_app/school_detail.html'
  </code></pre>
  
  <p><strong>this is my school_list.html</strong></p>
  
  <pre><code>{% extends 'basic_app/basic_app_base.html' %}
  
  {% block title %}
  &lt;title&gt; School List Page &lt;/title&gt;
  {% endblock title %}
  
  {% block content %}
  &lt;h1&gt; Welcome to the list of schools &lt;/h1&gt;
  &lt;ol&gt;
  {% for school in schools %}
  &lt;h3&gt;&lt;li&gt;&lt;a href="{{school.id}}"&gt;{{school.name}}&lt;/a&gt;&lt;/li&gt;&lt;/h3&gt;
  {% endfor %}
  &lt;/ol&gt;
  {% endblock content %}
  </code></pre>
  
  <p><strong>this is my school_detail.html</strong></p>
  
  <pre><code>{% extends 'basic_app/basic_app_base.html' %}
  {% block title %}
  &lt;title&gt; School Details Page &lt;/title&gt;
  {% endblock title %}
  
  {% block content %}
  &lt;h1&gt; Welcome to the Details of schools &lt;/h1&gt;
  &lt;h2&gt; School Details &lt;/h2&gt;
  &lt;p&gt;Name: {{school_detail.name}} &lt;/p&gt;
  &lt;p&gt;Principal: {{school_detail.principal}} &lt;/p&gt;
  &lt;p&gt;Location: {{school_detail.location}} &lt;/p&gt;
  &lt;h2&gt; Students: &lt;/h2&gt;
  {% for student in school_detail.students.all %}
  &lt;p&gt; {{student.name}} who is {{student.age}} years old &lt;/p&gt;
  {% endfor %} 
  {% endblock content %}
  </code></pre>
  
  <p>I want to redirect the link into the school detail view.</p>