Skip to content

Commit

Permalink
feat: add admin.StackedInline example #228
Browse files Browse the repository at this point in the history
  • Loading branch information
Agus Makmun committed Mar 29, 2024
1 parent 93470dc commit cd99cc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion martor_demo/app/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ class PostMetaAdminInline(admin.TabularInline):
model = PostMeta


class PostMetaStackedInline(admin.StackedInline):
model = PostMeta


class PostAdmin(admin.ModelAdmin):
inlines = [PostMetaAdminInline]
inlines = [PostMetaAdminInline, PostMetaStackedInline]
list_display = ["title", "id"]
formfield_overrides = {
MartorField: {"widget": AdminMartorWidget},
Expand Down

0 comments on commit cd99cc2

Please sign in to comment.