Ticket #10111: 10111.patch
File 10111.patch, 997 bytes (added by , 16 years ago) |
---|
-
django/trunk/docs/ref/contrib/admin.txt
810 810 ============================ 811 811 812 812 The admin interface has the ability to edit models on the same page as a 813 parent model. These are called inlines. You can add them to a model by 814 specifying them in a ``ModelAdmin.inlines`` attribute:: 813 parent model. These are called inlines. Suppose you have these two models:: 815 814 815 class Author(models.Model): 816 name = models.CharField(max_length=100) 817 818 class Book(models.Model): 819 author = models.ForeignKey(Author) 820 title = models.CharField(max_length=100) 821 822 You can edit the books authored by an author on the author page. You add 823 inlines to a model by specifying them in a ``ModelAdmin.inlines``:: 824 816 825 class BookInline(admin.TabularInline): 817 826 model = Book 818 827