Skip to content

Commit

Permalink
filter Text by Keyword(s); fixed #50
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Aug 25, 2021
1 parent 173087d commit 15f9970
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions archiv/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,14 @@ class TextListFilter(django_filters.FilterSet):
help_text=Text._meta.get_field('kommentar').help_text,
label=Text._meta.get_field('kommentar').verbose_name
)
rvn_stelle_text_text__key_word = django_filters.ModelMultipleChoiceFilter(
queryset=KeyWord.objects.all(),
help_text='Keyword',
label='Keyword',
widget=autocomplete.Select2Multiple(
url="archiv-ac:ort-autocomplete",
)
)

class Meta:
model = Text
Expand Down
1 change: 1 addition & 0 deletions archiv/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ def __init__(self, *args, **kwargs):
'legacy_pk',
'autor',
'title',
'rvn_stelle_text_text__key_word',
'jahrhundert',
'not_before',
'not_after',
Expand Down

0 comments on commit 15f9970

Please sign in to comment.