Exemple #1
0
 def test_fk_exclusion(self):
     """
     Regression test for #11709 - when testing for fk excluding (when exclude is
     given) make sure fk_name is honored or things blow up when there is more
     than one fk to the parent model.
     """
     class TwoAlbumFKAndAnEInline(admin.TabularInline):
         model = TwoAlbumFKAndAnE
         exclude = ("e",)
         fk_name = "album1"
     validate_inline(TwoAlbumFKAndAnEInline, None, Album)
Exemple #2
0
 def test_inline_with_specified(self):
     class TwoAlbumFKAndAnEInline(admin.TabularInline):
         model = TwoAlbumFKAndAnE
         fk_name = "album1"
     validate_inline(TwoAlbumFKAndAnEInline, None, Album)