You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class SpecificationGroupedContentValueInline(NestedStackedInline):
model = SpecificationGroupedContentValue
extra = 1
class SpecsGroupedContentInline(NestedStackedInline):
model = SpecificationGroupedContent
inlines = [SpecificationGroupedContentValueInline]
extra = 1
class SpecsContentInline(NestedStackedInline):
model = SpecificationListContent
extra = 1
class SpecsInline(NestedStackedInline):
model = Specification
inlines = [SpecsContentInline, SpecsGroupedContentInline]
extra = 1
class ProductAdmin(AuthorStampedMixin, NestedModelAdmin):
inlines = [
SpecsInline
]
list_display = ('name',)
admin.site.register(Product, ProductAdmin)
My goal was within the inline for Specs, there would be an inline entry for SpecificationListContent and the inline group for SpecificationGroupedContent. When the admin page renders, it looks like this
So from the photo, for the Specification inline, i have two sections, a Specification List Contents inline and a Specification Grouped Contents. In Specification Grouped Contents, there's a field called "Field unit" and another inline for Specification Grouped Content Values which i could add additional values for. what happens is that for the Specification Grouped Content, when i try adding a new one, there's no "Value" entry form row present in the new Specification Grouped Content inline like the image below
No rows are being added also when i try clicking the "Add another Specification Grouped Content Value" link to hopefully generate a row.
Is there something incorrect with my setup? I tried testing with just the SpecsGroupedContentInline present in the SpecsInline inline object but the result is still the same.
I'm using Django 1.7
Thanks
The text was updated successfully, but these errors were encountered:
from what i could tell also, it seems the fields for the new lines are added but hidden due to the wrapping div having an empty-form class. There's also missing jquery commands for it unlike for the previous rows. It seems to only affect last models which are foreign keys of other models as well.
Also, it seems to affect only last models in inlines which are foreign keys of another model
hi. i have the following model definition setup
I set up the django admin like so
My goal was within the inline for Specs, there would be an inline entry for SpecificationListContent and the inline group for SpecificationGroupedContent. When the admin page renders, it looks like this
So from the photo, for the Specification inline, i have two sections, a Specification List Contents inline and a Specification Grouped Contents. In Specification Grouped Contents, there's a field called "Field unit" and another inline for Specification Grouped Content Values which i could add additional values for. what happens is that for the Specification Grouped Content, when i try adding a new one, there's no "Value" entry form row present in the new Specification Grouped Content inline like the image below
No rows are being added also when i try clicking the "Add another Specification Grouped Content Value" link to hopefully generate a row.
Is there something incorrect with my setup? I tried testing with just the SpecsGroupedContentInline present in the SpecsInline inline object but the result is still the same.
I'm using Django 1.7
Thanks
The text was updated successfully, but these errors were encountered: