Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to filter flatpages by portal #4097

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ CHANGELOG
- Add `report` model on Intervention filters in module list (#3972)
- Homogenize `structure` field in APIv2 to always return ids instead of names (#3007)
- Add structures to Aggregator (#3569)
- Allow to filter flatpages by portal on admin list page


2.104.2 (2024-04-04)
Expand Down
5 changes: 4 additions & 1 deletion geotrek/flatpages/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ class BaseAdmin(TreeAdmin):

class FlatPageAdmin(BaseAdmin):
list_display = ('title', 'published', 'publication_date', 'portals_for_display', )
list_filter = ('published', )
list_filter = (
'published',
("portals", admin.filters.RelatedOnlyFieldListFilter),
)
search_fields = ('title', 'content')
form = movenodeform_factory(flatpages_models.FlatPage, form=FlatPageForm)

Expand Down
Loading