diff mbox series

[layerindex-web,2/3] Update settings.py to work with Django 5.2

Message ID 20260329171109.34764-2-piotr@qbee.io
State Accepted, archived
Commit 14cec5b7d355b2d9ab8de0dd8dfa2d69bc1ff5ec
Delegated to: Tim Orling
Headers show
Series [layerindex-web,1/3] Convert logout to a POST request, as GET is not longer supported by the new Djang 5.2 TLS. | expand

Commit Message

Piotr Buliński March 29, 2026, 5:11 p.m. UTC
1. Remove USE_L10N, as it's removed since Django version 5.0
2. Set USE_TZ = False, as in Django 5.0 the default was changed to True

Signed-off-by: Piotr Buliński <piotr@qbee.io>
---
 docker/settings.py | 6 +++---
 settings.py        | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Tim Orling March 30, 2026, 4:17 a.m. UTC | #1
Merged to master. Thank you.

On Sun, Mar 29, 2026 at 10:11 AM Piotr Buliński via lists.yoctoproject.org
<piotr=qbee.io@lists.yoctoproject.org> wrote:

> 1. Remove USE_L10N, as it's removed since Django version 5.0
> 2. Set USE_TZ = False, as in Django 5.0 the default was changed to True
>
> Signed-off-by: Piotr Buliński <piotr@qbee.io>
> ---
>  docker/settings.py | 6 +++---
>  settings.py        | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/docker/settings.py b/docker/settings.py
> index 9a96e83..fdf09de 100644
> --- a/docker/settings.py
> +++ b/docker/settings.py
> @@ -45,9 +45,9 @@ SITE_ID = 1
>  # to load the internationalization machinery.
>  USE_I18N = True
>
> -# If you set this to False, Django will not format dates, numbers and
> -# calendars according to the current locale
> -USE_L10N = True
> +# As of Django 5.0 the defaults has changed to True, so set it to False
> to avoid
> +# timezone-aware datetimes which require more complex handling in the
> codebase.
> +USE_TZ = False
>
>  # Avoid specific paths
>  BASE_DIR = os.getenv('BASE_DIR', os.path.dirname(__file__))
> diff --git a/settings.py b/settings.py
> index fa303b1..bbc5aca 100644
> --- a/settings.py
> +++ b/settings.py
> @@ -45,9 +45,9 @@ SITE_ID = 1
>  # to load the internationalization machinery.
>  USE_I18N = True
>
> -# If you set this to False, Django will not format dates, numbers and
> -# calendars according to the current locale
> -USE_L10N = True
> +# As of Django 5.0 the defaults has changed to True, so set it to False
> to avoid
> +# timezone-aware datetimes which require more complex handling in the
> codebase.
> +USE_TZ = False
>
>  # Avoid specific paths
>  BASE_DIR = os.path.dirname(__file__)
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#3576):
> https://lists.yoctoproject.org/g/yocto-patches/message/3576
> Mute This Topic: https://lists.yoctoproject.org/mt/118566580/924729
> Group Owner: yocto-patches+owner@lists.yoctoproject.org
> Unsubscribe:
> https://lists.yoctoproject.org/g/yocto-patches/leave/13169857/924729/1023951714/xyzzy
> [ticotimo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
>
diff mbox series

Patch

diff --git a/docker/settings.py b/docker/settings.py
index 9a96e83..fdf09de 100644
--- a/docker/settings.py
+++ b/docker/settings.py
@@ -45,9 +45,9 @@  SITE_ID = 1
 # to load the internationalization machinery.
 USE_I18N = True
 
-# If you set this to False, Django will not format dates, numbers and
-# calendars according to the current locale
-USE_L10N = True
+# As of Django 5.0 the defaults has changed to True, so set it to False to avoid
+# timezone-aware datetimes which require more complex handling in the codebase.
+USE_TZ = False
 
 # Avoid specific paths
 BASE_DIR = os.getenv('BASE_DIR', os.path.dirname(__file__))
diff --git a/settings.py b/settings.py
index fa303b1..bbc5aca 100644
--- a/settings.py
+++ b/settings.py
@@ -45,9 +45,9 @@  SITE_ID = 1
 # to load the internationalization machinery.
 USE_I18N = True
 
-# If you set this to False, Django will not format dates, numbers and
-# calendars according to the current locale
-USE_L10N = True
+# As of Django 5.0 the defaults has changed to True, so set it to False to avoid
+# timezone-aware datetimes which require more complex handling in the codebase.
+USE_TZ = False
 
 # Avoid specific paths
 BASE_DIR = os.path.dirname(__file__)