From 7d9b8610d00003e9d4888b1a9eefa0643e786600 Mon Sep 17 00:00:00 2001 From: Shawn Crawley Date: Thu, 16 Oct 2025 10:41:11 -0600 Subject: [PATCH 1/2] Removes explicit Django 3.2 refs from code/docs --- .github/workflows/tethys-release.yml | 3 +-- .github/workflows/tethys.yml | 7 +++---- docs/tethys_sdk/layouts.rst | 2 +- docs/whats_new.rst | 2 +- docs/whats_new/app_migration.rst | 2 +- environment.yml | 2 +- micro_environment.yml | 2 +- pyproject.toml | 2 +- scripts/generate_portal_config_tables.py | 14 +++++++------- tethys_portal/settings.py | 6 +++--- 10 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/tethys-release.yml b/.github/workflows/tethys-release.yml index 6814bc13d..466177b6c 100644 --- a/.github/workflows/tethys-release.yml +++ b/.github/workflows/tethys-release.yml @@ -20,10 +20,9 @@ jobs: matrix: platform: [ ubuntu-latest ] python-version: [ "3.10", "3.11", "3.12", "3.13" ] - django-version: [ "3.2", "4.2", "5.2" ] + django-version: [ "4.2", "5.2" ] exclude: - python-version: "3.13" - django-version: "3.2" steps: # Checkout the source - name: Checkout Source diff --git a/.github/workflows/tethys.yml b/.github/workflows/tethys.yml index 0c5b0012e..bc7ac1d18 100644 --- a/.github/workflows/tethys.yml +++ b/.github/workflows/tethys.yml @@ -61,7 +61,7 @@ jobs: matrix: platform: [ "ubuntu-latest" ] python-version: [ "3.10", "3.11", "3.12", "3.13" ] - django-version: [ "3.2", "4.2", "5.2" ] + django-version: [ "4.2", "5.2" ] include: - platform: "macos-latest" python-version: "3.13" @@ -71,7 +71,6 @@ jobs: django-version: "5.2" exclude: - python-version: "3.13" - django-version: "3.2" steps: # Checkout the source - name: Checkout Source @@ -115,7 +114,7 @@ jobs: matrix: platform: [ ubuntu-latest ] python-version: [ "3.10", "3.11", "3.12" ] - django-version: [ "3.2", "4.2", "5.2" ] + django-version: [ "4.2", "5.2" ] steps: # Checkout the source - name: Checkout Source @@ -155,7 +154,7 @@ jobs: matrix: platform: [ ubuntu-latest ] python-version: [ "3.10", "3.11", "3.12" ] - django-version: [ "3.2", "4.2", "5.2" ] + django-version: [ "4.2", "5.2" ] services: tethys-postgis: image: postgis/postgis:14-3.3 diff --git a/docs/tethys_sdk/layouts.rst b/docs/tethys_sdk/layouts.rst index 15a51a4e1..912cdfbb7 100644 --- a/docs/tethys_sdk/layouts.rst +++ b/docs/tethys_sdk/layouts.rst @@ -32,7 +32,7 @@ The Layout Showcase App is a Tethys App can be installed in any Tethys Portal an Tethys Layouts ============== -Layouts are implemented using `Django class-based views / contollers `_ in a novel way that allows all the logic of complex views to be encapsulated in a single class. This makes them easy to implement, customize, and maintain. All Layouts inherit much of their core functionality from the ``TethysLayout`` class. +Layouts are implemented using `Django class-based views / contollers `_ in a novel way that allows all the logic of complex views to be encapsulated in a single class. This makes them easy to implement, customize, and maintain. All Layouts inherit much of their core functionality from the ``TethysLayout`` class. Class Based Views ----------------- diff --git a/docs/whats_new.rst b/docs/whats_new.rst index ede12d736..d33844d02 100644 --- a/docs/whats_new.rst +++ b/docs/whats_new.rst @@ -17,7 +17,7 @@ Major Features Django 4/5 Support .................. -* Tethys Platform 4.3 is compatible with Django versions 3.2 - 5.x. It is now recommended to explicitly specify the version of Django that you want when you create your tethys environment. +* Tethys Platform 4.3 is compatible with Django versions 4.2 - 5.x. It is now recommended to explicitly specify the version of Django that you want when you create your tethys environment. See: :ref:`development_installation` diff --git a/docs/whats_new/app_migration.rst b/docs/whats_new/app_migration.rst index 74a44603a..45220e589 100644 --- a/docs/whats_new/app_migration.rst +++ b/docs/whats_new/app_migration.rst @@ -470,7 +470,7 @@ Other Resources It is not possible to anticipate every migration step that will be needed. The suggestions are for the cases that will be most commonly encountered. The following resources may provide additional guidance for migrating your app(s). -* Tethys is powered by Django. If your app makes uses of Django features directly, you may need to perform additional migration steps. See `Upgrading Django to a newer version `_ and `Django 3.2 Release Notes `_. +* Tethys is powered by Django. If your app makes uses of Django features directly, you may need to perform additional migration steps. See `Upgrading Django to a newer version `_ and `Django 5.2 Release Notes `_. * Apps are styled using Bootstrap, a frontend CSS framework. If your app uses Bootstrap components other than those described above, use these links to help you migrate: `Migrating to v4 | Bootstrap `_ and `Migrating to v5 | Bootstrap `_. .. _app_migration_older_apps: diff --git a/environment.yml b/environment.yml index 418a43c20..86ed3cb05 100644 --- a/environment.yml +++ b/environment.yml @@ -20,7 +20,7 @@ dependencies: - openssl # core dependencies - - django>=3.2,<6 + - django>=4.2,<6 - channels - daphne - setuptools_scm diff --git a/micro_environment.yml b/micro_environment.yml index 634a284da..4bc2dff3b 100644 --- a/micro_environment.yml +++ b/micro_environment.yml @@ -19,7 +19,7 @@ dependencies: - openssl # core dependencies - - django>=3.2,<6 + - django>=4.2,<6 - channels - daphne - setuptools_scm diff --git a/pyproject.toml b/pyproject.toml index 7963429cd..1b511bc88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ requires-python = ">= 3.10" dependencies = [ "pyopenssl", # core dependencies - "django>=3.2,<6", + "django>=4.2,<6", "channels", "daphne", "requests", diff --git a/scripts/generate_portal_config_tables.py b/scripts/generate_portal_config_tables.py index ae2fd3bdd..fd419251e 100644 --- a/scripts/generate_portal_config_tables.py +++ b/scripts/generate_portal_config_tables.py @@ -1,5 +1,5 @@ # flake8: noqa -DJANGO_VERSION = 3.2 +DJANGO_VERSION = 5.2 d = { "": { @@ -32,12 +32,12 @@ "DATABASES": { "__description__": f"See the Django `DATABASES `_ setting.", "default": { - "ENGINE": "the Django default database `ENGINE `_ setting. Default is ``django.db.backends.sqlite3``.", - "NAME": "the Django default databases `NAME `_ setting. If using the ``sqlite3`` ``ENGINE`` (default) then the default value for name will be ``tethys_platform.sqlite`` and will be located in the ``TETHYS_HOME`` directory. If another ``ENGINE`` is used then the default value is ``tethys_platform``.", - "USER": "the Django default database `USER `_ setting. Not used with SQLite.", - "PASSWORD": "the Django default database `PASSWORD `_ setting. Not used with SQLite.", - "HOST": "the Django default database `HOST `_ setting. Not used with SQLite.", - "PORT": "the Django default database `PORT `_ setting. Not used with SQLite.", + "ENGINE": "the Django default database `ENGINE `_ setting. Default is ``django.db.backends.sqlite3``.", + "NAME": "the Django default databases `NAME `_ setting. If using the ``sqlite3`` ``ENGINE`` (default) then the default value for name will be ``tethys_platform.sqlite`` and will be located in the ``TETHYS_HOME`` directory. If another ``ENGINE`` is used then the default value is ``tethys_platform``.", + "USER": "the Django default database `USER `_ setting. Not used with SQLite.", + "PASSWORD": "the Django default database `PASSWORD `_ setting. Not used with SQLite.", + "HOST": "the Django default database `HOST `_ setting. Not used with SQLite.", + "PORT": "the Django default database `PORT `_ setting. Not used with SQLite.", "DIR": "name of psql directory for conda installation of PostgreSQL that ships with Tethys (if using the ``django.db.backends.postgresql`` ``ENGINE``). This directory will be created relative to the ``TETHYS_HOME`` directory when ``tethys db create`` is executed, unless an absolute path is provided. Defaults to ``psql``. If you are using the ``sqlite3`` ``ENGINE`` or an external database server then exclude this key or set it to `None`.", }, }, diff --git a/tethys_portal/settings.py b/tethys_portal/settings.py index 3c8404554..bb4d9985c 100644 --- a/tethys_portal/settings.py +++ b/tethys_portal/settings.py @@ -14,10 +14,10 @@ This file contains default Django and other settings for the Tethys Platform. For more information on this file, see -https://docs.djangoproject.com/en/3.2/topics/settings/ +https://docs.djangoproject.com/en/5.2/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/3.2/ref/settings/ +https://docs.djangoproject.com/en/5.2/ref/settings/ """ # Build paths inside the project like this: BASE_DIR / '...' @@ -181,7 +181,7 @@ DEFAULT_DB.setdefault("PORT", 5436) -# See https://docs.djangoproject.com/en/3.2/ref/settings/#logging-config for more logging configuration options. +# See https://docs.djangoproject.com/en/5.2/ref/settings/#logging-config for more logging configuration options. LOGGING = portal_config_settings.pop("LOGGING", {}) LOGGING.setdefault("version", 1) LOGGING.setdefault("disable_existing_loggers", False) From ca21605298cbfab9fd401d936b00623dca5277aa Mon Sep 17 00:00:00 2001 From: ShawnCrawley-NOAA Date: Thu, 23 Oct 2025 11:16:03 -0600 Subject: [PATCH 2/2] Remove unnecessary exclude clause --- .github/workflows/tethys-release.yml | 2 -- .github/workflows/tethys.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/tethys-release.yml b/.github/workflows/tethys-release.yml index 466177b6c..d7b9d933f 100644 --- a/.github/workflows/tethys-release.yml +++ b/.github/workflows/tethys-release.yml @@ -21,8 +21,6 @@ jobs: platform: [ ubuntu-latest ] python-version: [ "3.10", "3.11", "3.12", "3.13" ] django-version: [ "4.2", "5.2" ] - exclude: - - python-version: "3.13" steps: # Checkout the source - name: Checkout Source diff --git a/.github/workflows/tethys.yml b/.github/workflows/tethys.yml index 5dd074f71..fffbdfd98 100644 --- a/.github/workflows/tethys.yml +++ b/.github/workflows/tethys.yml @@ -73,8 +73,6 @@ jobs: - platform: "macos-latest" python-version: "3.13" django-version: "5.2" - exclude: - - python-version: "3.13" steps: # Checkout the source - name: Checkout Source