On Dec 14, 5:19 am, Marc DM wrote:
> If you want to edit them together in the admin then do this for your
> admin class
>
> #
> class BookInline(admin.TabularInline)
> model = Book
> extra = 2
>
> class
If you want to edit them together in the admin then do this for your
admin class
#
class BookInline(admin.TabularInline)
model = Book
extra = 2
class AuthorOptions(admin.ModelAdmin)
inlines = [BookInline]
admin.register(Author, AuthorOptions)
I have been hunting around but can't find a solution to this problem:
It is probably best described with an example
Example:
class Author(models.Model):
name= models.CharField()
location = models.CharField()
class Book(models.Model):
name= models.CharField()
3 matches
Mail list logo