title: Custom view on admin site
body: <p>I would like to have a custom view on a model admin.</p>
  
  <p>Current behavior:</p>
  
  <p>When i click on Model object(1) it takes me to <code>site/app_label/1/change</code>,
  This leads to edit of the object with its inlines.</p>
  
  <p>What I want to achieve:</p>
  
  <p>when i click on a object should redirect to <code>site/app_label/1</code> it should show a list view of its inlines (Not a editable list) i will put a separate button which will lead to <code>site/app_label/1/change</code></p>
  
  <p>I want this list view to be similar to Django default style listing.</p>
  
  <p>My two models are:</p>
  
  <pre><code>class RunConfig(models.Model):
      config_name = models.CharField(max_length=100,blank=False,null=False, unique=True )
  
  
  class Jobs(models.Model):
      config_name     = models.ForeignKey('RunConfig',on_delete=models.CASCADE,)
      job_name        = models.TextField(blank=True,null=True, )
      parameters      = models.TextField(blank=True,null=True, )
      exec_order      = models.IntegerField(help_text="Execution Order")
  </code></pre>
  
  <p>admin.py</p>
  
  <pre><code>class JobsInline(SortableInlineAdminMixin, admin.TabularInline):
      model = Jobs
      extra = 1
  
  
  class RunConfigAdmin(admin.ModelAdmin):
          list_display  = ('config_name',)
  </code></pre>
  
  <p>What I have tried till now: </p>
  
  <p>My plan was to override the changelist template but that did not work as it started to complain about no reverse match found for app_list</p>
  
  <p>in admin.py added custom url</p>
  
  <pre><code>def get_urls(self):
          urls = super(RunConfigAdmin, self).get_urls()
          my_urls = [
  
              url(r'^(?P&lt;pk&gt;[0-9]+)/$',  self.admin_site.admin_view(RunConfigDetailView.as_view(), cacheable=True), name='rc-detail'),
          ]
          return my_urls + urls
  </code></pre>
  
  <p>created a detailed view on views.py i was expecting it wil be easier to use the <code>context['job']</code> to achive the result but I failed :(</p>
  
  <pre><code>class RunConfigDetailView(LoginRequiredMixin,DetailView):
      model = RunConfig
      context_object_name = 'rc_detail'
  
  
      def get_context_data(self,**kwargs):
          context = super(RunConfigDetailView, self).get_context_data(**kwargs)
          context['opts']  = self.model._meta
          context['jobs'] = Jobs.objects.filter(config_name=self.object.id)
  
          return context
  </code></pre>