From fa8dadcce5665673ef974249150a48bbc251dacd Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sun, 15 Dec 2024 23:13:14 +0000 Subject: [PATCH] formatting and URLs - online edit of handbook/troggle/trogdjangup.html [PosixPath('/home/philip/expo/expoweb/handbook/troggle/trogdjangup.html')] --- handbook/troggle/trogdjangup.html | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/handbook/troggle/trogdjangup.html b/handbook/troggle/trogdjangup.html index 93889913e..c3a89c0b8 100644 --- a/handbook/troggle/trogdjangup.html +++ b/handbook/troggle/trogdjangup.html @@ -10,7 +10,7 @@

CUCC Expedition Handbook

Upgrading Django for Troggle

Why this used to be difficult

-

Before Django 3.0, whenever Django was upgraded to a new version things broke across the entire django package, including things which we don't conciously use but are internal dependencies within Django. These were 'the way to do it' when troggle was first written for Django 0.7 in 2006. So upgrading troggle to a new Django version required not just a broad beadth of knowledge across troggle, but also across the entire breadth of django itself. And the error messages are sometimes very unhelpful. This is no longer the case and the Django organisation has a very clear "non-breaking" policy between LTS releases. +

Before Django 3.0, whenever Django was upgraded to a new version things broke across the entire django package, including things which we did't conciously use but which were internal dependencies within Django. These were 'the way to do it' when troggle was first written for Django 0.7 in 2006. So upgrading troggle to a new Django version required not just a broad beadth of knowledge across troggle, but also across the entire breadth of Django itself. And the error messages are sometimes very unhelpful. This is no longer the case and the Django organisation has a very clear "non-breaking" policy between LTS releases.

Now read Django and Troggle if you haven't already.

Note that Django 3.2 is out of support since April 2024. @@ -152,8 +152,8 @@ sqlite database browser software very helpful and that you will need to know git So we went from 1.8.19 to 1.9.13 to 1.10.8 to 1.11.29 to 2.0.13 to 2.1.15 then 2.2.19 (variously patched at .20, .24, .25) and then 3.2.10 when we upgraded debian 10 (buster) to 11 (bullseye).

  • Use the django 'check' maintenance system at the most verbose setting at each release
    -troggle$ python manage.py check -v 3 --deploy
    -troggle$ python -Wall manage.py check
    + troggle$ python manage.py check -v 3 --deploy
    +troggle$ python -Wall manage.py check
  • Use our test suite (and if you see errors, run it with -v 3)
    troggle$ python manage.py test [-v 3] [--parallel auto]
    The --parallel option runs the tests in parallel on your machine which is much faster. @@ -197,7 +197,7 @@ release note. From
  • Copy server.toml on top of pyprojectr.toml and synchronise the environment: uv sync.
  • check the versions of plugins using uv tree -
    (troggle) philip@Mohawk:~/expo/troggle$ uv tree --all-groups
    +  
    (troggle) philip@Mohawk:~/expo/troggle$ uv tree --all-groups
     Resolved 11 packages in 0.54ms
     troggle-server v2024.12.1
     ├── beautifulsoup4 v4.11.2 (group: server)
    @@ -247,15 +247,22 @@ Django just didn't support it because they couldn't spare the effort to test it.
     Follow the instructions in the "Unit tests" section installed locally at docs/internals/contributing/writing-code/unit-tests.txt, published online at docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/
     This involves running git clone on the django source repo to download the tests.  We hope we never have to do this again but in case we get incomprehensible bugs in future, we should be prepared to do so.
     
    +  

    Current upgrade status is documented: here.


    -

    Current upgrade status is documented: here. -

    - Go on to: Troggle architecture
    Return to: Django and Troggle
    Return to: Troggle intro
    -Troggle index: -Index of all troggle documents
    + + + +Return to: Troggle programmers' guide
    + +Go to: ⚒ Troggle development laptop +☯ Troggle development WSL laptop
    +
    + Troggle index: +Index of all troggle documents
    +