I have this Page with a ForeignKey districtobject:
class DistrictPage(Page):
districtobject = models.ForeignKey(DistrictTranslated, on_delete=models.SET_NULL, null=True, blank=True)
streamfield = StreamField(BasicStreamBlock, null=True, blank=True, use_json_field=True)
content_panels = Page.content_panels + [
#InfoPanel(),
FieldPanel('districtobject', classname="full"),
FieldPanel('streamfield'),
]
In the wagtail admin interface the dropdown menu have to much values for districtobject. I want to implement a dynamic filter, which shows only a few entries based on the parent Page object.
How/where can I implement my own queryset for this dropdown?