ixc / wagtail-instance-selector

A widget for Wagtail's admin that allows you to create and select related items
MIT License
54 stars 17 forks source link

Is there a way to add inside a blocks.ListBlock ? #16

Closed diegoleft closed 3 years ago

diegoleft commented 3 years ago

Is there a way to add wagtail-instance-selector inside a ListBlock? like this:

class DocumentsPlansBlock(InstanceSelectorBlock):
    def __init__(self, *args, **kwargs):
        target_model = kwargs.pop("target_model", "plans.Plan")
        super().__init__(target_model=target_model, **kwargs)

    class Meta:
        icon = "image"

.........

items = blocks.ListBlock(
        DocumentsPlansBlock(),
        label="Documentos / Checkout"
    )

My specification:

After adding I just broke my panel where i should see all my StreamFields

Captura de Pantalla 2021-05-24 a la(s) 19 57 09
diegoleft commented 3 years ago

forget it I just need to run

python manage.py collectstatic --noinput

thanks