title: why link not displaying content after click on the link?
body: <p>it is displaying content in home.html. but it is not displaying the content(T1.name and T1.address) in index_detail.html after click on T1.name. Django version 4.0.6. The code is below please have a look into it. please solve the issue. Thank you for your time.</p>
  <pre><code>Settings.py
  
  from pathlib import Path
  import os
  # Build paths inside the project like this: BASE_DIR / 'subdir'.
  BASE_DIR = Path(__file__).resolve().parent.parent
  TEMPLATES_DIR=os.path.join(BASE_DIR,&quot;templates&quot;)
  
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
  
  # SECURITY WARNING: keep the secret key used in production secret!
  SECRET_KEY = 'django-insecure-d4@4fwcpkk$6a8ylqjmyhp-9%22t^aizetygwkxzw9s_wu5$&amp;2'
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = True
  
  ALLOWED_HOSTS = []
  
  
  # Application definition
  
  INSTALLED_APPS = [
  'django.contrib.admin',
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  'g6app',
  ]
  
  MIDDLEWARE = [
  'django.middleware.security.SecurityMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.middleware.csrf.CsrfViewMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.messages.middleware.MessageMiddleware',
  'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  ROOT_URLCONF = 'g6.urls'
  
  TEMPLATES = [
  {
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
  'DIRS': [TEMPLATES_DIR,],
  'APP_DIRS': True,
  'OPTIONS': {
      'context_processors': [
          'django.template.context_processors.debug',
          'django.template.context_processors.request',
          'django.contrib.auth.context_processors.auth',
          'django.contrib.messages.context_processors.messages',
      ],
      },
      },
  ]
  </code></pre>
  <p>urls.py</p>
  <pre><code>from django.contrib import admin
  from django.urls import path
  from g6app.views import V1,V2
  
  urlpatterns = [
  path('admin/', admin.site.urls),
  path(&quot;&quot;,V1.as_view(),name=&quot;v11&quot;),
  path(&quot;index/&lt;int:pk&gt;&quot;,V2.as_view(),name=&quot;index_detail&quot;),
  ]
    admin.py
  
  from django.contrib import admin
  from . models import T1
  # Register your models here.
  admin.site.register(T1)
  </code></pre>
  <p>  models.py</p>
  <pre><code>from django.db import models
  from django.urls import reverse
  
  
  # Create your models here.
  
      class T1(models.Model):
          name=models.CharField(max_length=100)
          address=models.TextField()
      
  
          def __str__(self):
              return self.name
  
          def get_absolute_url(self):
              return reverse(&quot;index_detail&quot;,args=[self.pk])
    
  </code></pre>
  <p>views.py</p>
  <pre><code>from django.shortcuts import render
  from django.views.generic import ListView, DetailView
  from .models import T1
  # Create your views here.
  
  class V1(ListView):
      model=T1
      context_object_name=&quot;con1&quot;
      template_name=&quot;home.html&quot;
  
  
  class V2(DetailView):
      model=T1
      context_object_name=&quot;con2&quot;
      template_name=&quot;index_detail.html&quot;
  
  
    home.html
  
  &lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;home page&lt;/h1&gt;
   {% block context %}
    {% for T1 in con1 %}
      &lt;h4&gt;&lt;a href=&quot;{% url 'index_detail' T1.pk %}&quot;&gt;{{T1.name}}&lt;/a&gt;&lt;/h4&gt;
      &lt;h4&gt;{{T1.address}}&lt;/h4&gt;
  
    {% endfor %}
   {% endblock context %}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>  index_detail.html</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset=&quot;utf-8&quot;&gt;
      &lt;title&gt;&lt;/title&gt;
    &lt;/head&gt;
  &lt;body&gt;
  
  &lt;h1&gt;detail view page&lt;/h1&gt;
  {% block context %}
  &lt;h4&gt;{{T1.name}}&lt;/h4&gt;]
  &lt;h4&gt;{{T1.address}}&lt;/h4&gt;
  
  {% endblock context %}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>