title: Django deep admin.TabularInline
body: <p>if there is relation like: <a href="https://i.stack.imgur.com/Rcg6Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rcg6Z.png" alt="UML1"></a></p>
  
  <pre><code>B.ForeignKey(A)
  </code></pre>
  
  <p>django can show it in <code>one</code> admin <code>page</code> by <code>TabularInline</code>:</p>
  
  <p><strong>admin.py</strong></p>
  
  <pre><code>from django.contrib import admin
  from myapp2 import models
  # Register your models here.
  class TabularInlineB(admin.TabularInline):
      model=models.B
  
  class AdminA(admin.ModelAdmin):
      inlines=[TabularInlineB, ]
  
  admin.site.register(models.A, AdminA)
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>from django.db import models
  
  # Create your models here.
  
  class A(models.Model):
      name=models.CharField(max_length=10)
  
  class B(models.Model):
      name=models.CharField(max_length=10)
      a=models.ForeignKey(A)
  </code></pre>
  
  <p>.the output is like:<a href="https://i.stack.imgur.com/igj6c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/igj6c.png" alt="output1"></a></p>
  
  <p>but if we <code>add</code> another <code>ForeignKey</code> relation to <code>B</code>  like below,
  <a href="https://i.stack.imgur.com/wQgE3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wQgE3.png" alt="UML2"></a></p>
  
  <pre><code>B.ForeignKey(A)
  C.ForeignKey(B)
  </code></pre>
  
  <p>then <strong>How I can show all models in <code>one admin page</code>?</strong></p>
  
  <p><strong>admin.py</strong></p>
  
  <pre><code>from django.contrib import admin
  from myapp2 import models
  
  class TabularInlineC(admin.TabularInline):
      model=models.C
  
  class TabularInlineB(admin.TabularInline):
      model=models.B
      inlines=[TabularInlineC, ]
  
  class AdminA(admin.ModelAdmin):
      inlines=[TabularInlineB, ]
  
  admin.site.register(models.A, AdminA)
  </code></pre>
  
  <p>.<strong>models.py</strong></p>
  
  <pre><code>from django.db import models
  
  # Create your models here.
  
  class A(models.Model):
      name=models.CharField(max_length=10)
  
  class B(models.Model):
      name=models.CharField(max_length=10)
      a=models.ForeignKey(A)
  
  class C(models.Model):
      b=models.ForeignKey(B)
      name=models.CharField(max_length=10)
  </code></pre>
  
  <p>the output dose not show C:<a href="https://i.stack.imgur.com/WHL5n.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WHL5n.png" alt="outpu2"></a></p>