From c724c87eb5e23581732a275f1dd808da72932286 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Wed, 18 Nov 2026 21:42:59 +0100 Subject: refactor(core): standardize filter form rendering Render received and sent list controls through their WTForms instances and use a shared `filter_form` template variable for consistent filter handling. --- webmentions_ssg/views/sources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'webmentions_ssg/views/sources.py') diff --git a/webmentions_ssg/views/sources.py b/webmentions_ssg/views/sources.py index 84b98fb..a3dbb45 100644 --- a/webmentions_ssg/views/sources.py +++ b/webmentions_ssg/views/sources.py @@ -66,8 +66,8 @@ def source_filter_args(form: SourceFilterForm) -> SourceFilterArgs: @login_required def source_list() -> ResponseReturnValue: """Display source documents with filters for outgoing delivery problems.""" - form = source_filter_form() - filters = source_filter_args(form) + filter_form = source_filter_form() + filters = source_filter_args(filter_form) query = sa.select(SourceDocument).options( selectinload(SourceDocument.sent_webmentions) ) @@ -157,7 +157,6 @@ def source_list() -> ResponseReturnValue: "sent.html", title="Sent Webmentions", sources=sources, - form=form, filters=filters, sort_key=sort_key, sort_order=sort_order, @@ -165,6 +164,7 @@ def source_list() -> ResponseReturnValue: status_choices=SOURCE_STATUS_CHOICES, page_size=page_size, max_source_page_size=current_app.config["SOURCES_MAX_PAGE_SIZE"], + filter_form=filter_form, action_form=ConfirmActionForm(), ) -- cgit v1.3.1