mirror of
https://github.com/sissbruecker/linkding.git
synced 2026-03-11 04:13:12 +08:00
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:
committed by
GitHub
parent
460b435110
commit
573b6f5411
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user