Filter bundles by reading or sharing state (#1308)

* add filtering by reading or sharing state

* fix migration

* add tests

* format

* fix model references

* replace hard-coded strings in tests

---------

Co-authored-by: dfederschmidt <daniel@federschmidt.org>
Co-authored-by: Sascha Ißbrücker <sascha.issbruecker@gmail.com>
This commit is contained in:
Daniel Federschmidt
2026-02-28 10:54:09 +01:00
committed by GitHub
parent 460b435110
commit 573b6f5411
13 changed files with 301 additions and 2 deletions

View File

@@ -218,10 +218,28 @@ class BookmarkBundleForm(forms.ModelForm):
any_tags = forms.CharField(required=False, widget=TagAutocomplete)
all_tags = forms.CharField(required=False, widget=TagAutocomplete)
excluded_tags = forms.CharField(required=False, widget=TagAutocomplete)
filter_unread = forms.ChoiceField(
choices=BookmarkBundle.FILTER_UNREAD_CHOICES,
required=False,
widget=FormSelect,
)
filter_shared = forms.ChoiceField(
choices=BookmarkBundle.FILTER_SHARED_CHOICES,
required=False,
widget=FormSelect,
)
class Meta:
model = BookmarkBundle
fields = ["name", "search", "any_tags", "all_tags", "excluded_tags"]
fields = [
"name",
"search",
"any_tags",
"all_tags",
"excluded_tags",
"filter_unread",
"filter_shared",
]
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs, error_class=FormErrorList)