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
what_it_does = models.ForeignKey(
'ElementDescriptor',
null=True,
blank=True,
on_delete=models.SET_NULL,
related_name='+',
help_text='select a snippet from the what it does type',
verbose_name='What it does',
limit_choices_to={'descriptor_type': 1}
)
Issue Summary
Is it possible to limit/filter the result set of a snippet in the SnippetChooserPanel? I am using this example http://docs.wagtail.io/en/v1.0/reference/pages/editing_api.html#wagtail.wagtailadmin.edit_handers.wagtail.wagtailsnippets.edit_handlers.SnippetChooserPanel. So in my equivalent of
advert
,what_it_does
(below), I try to addlimit_choices_to={description_type=1}
to limit the ElementDescriptor snippets in the popup to show only the ones that are of descriptor_type 1. But it always lists ALL ElementDescriptors. Any way to work around this?and the way I use is:
The text was updated successfully, but these errors were encountered: