Hi ive been trying to get SortableStackedInline working with django-polymorphic and I cant seem to get the moveable boxes working on the inlines. Is this actually possible with this module? I took a look at this closed issue but it didn't end up helping.
models:
class PageObject(PolymorphicModel):
uuid = models.UUIDField(default=uuid.uuid4, editable=False)
page = models.ForeignKey(AggregatePage, on_delete=models.CASCADE)
position = models.PositiveIntegerField(default=0, blank=False, null=False)
class Meta:
ordering = ['position']
class CameraPageObject(PageObject):
camera = models.ForeignKey(Camera, on_delete=models.CASCADE)
class EmbedPageObject(PageObject):
name = models.CharField(max_length=150, blank=False, null=False)
url = models.URLField(blank=False, null=False)
admin:
class PageObjectInline(StackedPolymorphicInline):
class CameraPageObjectInline(StackedPolymorphicInline.Child, SortableStackedInline):
model = CameraPageObject
class EmbedPageObjectInline(StackedPolymorphicInline.Child, SortableStackedInline):
model = EmbedPageObject
model = PageObject
child_inlines = [CameraPageObjectInline, EmbedPageObjectInline]
@admin.register(AggregatePage)
class AggregatePageAdmin(SortableAdminBase, PolymorphicInlineSupportMixin, admin.ModelAdmin):
formfield_overrides = {models.ManyToManyField: {'widget': CheckboxSelectMultiple}}
inlines = [PageObjectInline]
Hi ive been trying to get SortableStackedInline working with django-polymorphic and I cant seem to get the moveable boxes working on the inlines. Is this actually possible with this module? I took a look at this closed issue but it didn't end up helping.
models:
admin: