From f00a565130c20271b44130a87e4330f7f2822077 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 17 Aug 2025 01:33:52 -0700 Subject: [PATCH 1/2] Documentation: fix Postgres version --- docs/administration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/administration.md b/docs/administration.md index fe5dd5a9b..3fe8bc19a 100644 --- a/docs/administration.md +++ b/docs/administration.md @@ -185,7 +185,7 @@ the instructions from your database's documentation for how to upgrade between m !!! note - As of Paperless-ngx v2.18, the minimum supported version of PostgreSQL is 13. + As of Paperless-ngx v2.18, the minimum supported version of PostgreSQL is 14. For PostgreSQL, refer to [Upgrading a PostgreSQL Cluster](https://www.postgresql.org/docs/current/upgrading.html). From ca9b5d95868269716c12029c997e48a38a73fcf0 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 17 Aug 2025 09:25:42 -0700 Subject: [PATCH 2/2] Documentation: fix filters docs (#10600) --- docs/advanced_usage.md | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/docs/advanced_usage.md b/docs/advanced_usage.md index 763488189..378ad424a 100644 --- a/docs/advanced_usage.md +++ b/docs/advanced_usage.md @@ -469,12 +469,12 @@ The `get_cf_value` filter retrieves a value from custom field data with optional ##### Datetime Formatting -The `format_datetime`filter formats a datetime string or datetime object using Python's strftime formatting. +The `datetime` filter formats a datetime string or datetime object using Python's strftime formatting. ###### Syntax ```jinja2 -{{ datetime_value | format_datetime('%Y-%m-%d %H:%M:%S') }} +{{ datetime_value | datetime('%Y-%m-%d %H:%M:%S') }} ``` ###### Parameters @@ -490,15 +490,11 @@ The `format_datetime`filter formats a datetime string or datetime object using P ```jinja2 -{{ created_at | format_datetime('%B %d, %Y at %I:%M %p') }} +{{ created | datetime('%B %d, %Y at %I:%M %p') }} - -{{ "2024-01-15T14:30:00" | format_datetime('%m/%d/%Y') }} - - -{{ timestamp | format_datetime('%A, %B %d, %Y') }} +{{ custom_fields | get_cf_value('Date Field') | datetime('%A, %B %d, %Y') }} ``` @@ -508,7 +504,8 @@ for the possible codes and their meanings. ##### Date Localization The `localize_date` filter formats a date or datetime object into a localized string using Babel internationalization. -This takes into account the provided locale for translation. +This takes into account the provided locale for translation. Since this must be used on a date or datetime object, +you must access the field directly, i.e. `document.created`. ###### Syntax @@ -531,27 +528,27 @@ This takes into account the provided locale for translation. ```jinja2 -{{ created_date | localize_date('short', 'en_US') }} +{{ document.created | localize_date('short', 'en_US') }} -{{ created_date | localize_date('medium', 'en_US') }} +{{ document.created | localize_date('medium', 'en_US') }} -{{ created_date | localize_date('long', 'en_US') }} +{{ document.created | localize_date('long', 'en_US') }} -{{ created_date | localize_date('full', 'en_US') }} +{{ document.created | localize_date('full', 'en_US') }} -{{ created_date | localize_date('medium', 'fr_FR') }} +{{ document.created | localize_date('medium', 'fr_FR') }} -{{ created_date | localize_date('medium', 'de_DE') }} +{{ document.created | localize_date('medium', 'de_DE') }} -{{ created_date | localize_date('dd/MM/yyyy', 'en_GB') }} +{{ document.created | localize_date('dd/MM/yyyy', 'en_GB') }} ```