Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepopulated_fields dont work in 2 level+ inlines #95

Open
ravique opened this issue Aug 21, 2018 · 1 comment
Open

prepopulated_fields dont work in 2 level+ inlines #95

ravique opened this issue Aug 21, 2018 · 1 comment

Comments

@ravique
Copy link

ravique commented Aug 21, 2018

class ProductGroupInline(NestedStackedInline):
model = ProductGroup
extra = 1
prepopulated_fields = {'product_group_slug': ('product_group_name',)}

class SubcategoryInline(NestedStackedInline):
model = SubCategory
extra = 1
inlines = [ProductGroupInline]
prepopulated_fields = {'subcategory_slug': ('subcategory_name',)}

class CategoryAdmin(NestedModelAdmin):
inlines = [SubcategoryInline]
prepopulated_fields = {'category_slug': ('category_name',)}

In this sample prepopulated_fields work for SubcategoryInline, CategoryAdmin but not for ProductGroupInline

@kfranco89
Copy link

did you solve it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants