From 60ee8375a293ea9b1e3e8833d7311945e6c033bc Mon Sep 17 00:00:00 2001 From: Tim Schilling Date: Tue, 19 Nov 2024 13:36:25 -0600 Subject: [PATCH 1/2] Updated all djangoproject.com links to reference the stable version --- CHANGES.rst | 1 + docs/common_issues.rst | 8 ++++---- simple_history/utils.py | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9c44563c3..f9f1366a9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,7 @@ Unreleased - Made ``skip_history_when_saving`` work when creating an object - not just when updating an object (gh-1262) - Improved performance of the ``latest_of_each()`` history manager method (gh-1360) +- Updated all djangoproject.com links to reference the stable version 3.7.0 (2024-05-29) ------------------ diff --git a/docs/common_issues.rst b/docs/common_issues.rst index b1c9a396a..83e62dc51 100644 --- a/docs/common_issues.rst +++ b/docs/common_issues.rst @@ -15,8 +15,8 @@ As of ``django-simple-history`` 2.2.0, we can use the utility function ``bulk_create_with_history`` in order to bulk create objects while saving their history: -.. _bulk_create: https://docs.djangoproject.com/en/2.0/ref/models/querysets/#bulk-create -.. _bulk_update: https://docs.djangoproject.com/en/3.0/ref/models/querysets/#bulk-update +.. _bulk_create: https://docs.djangoproject.com/en/stable/ref/models/querysets/#bulk-create +.. _bulk_update: https://docs.djangoproject.com/en/stable/ref/models/querysets/#bulk-update .. code-block:: pycon @@ -142,7 +142,7 @@ As the Django documentation says:: e.comments_on = False e.save() -.. _queryset updates: https://docs.djangoproject.com/en/2.2/ref/models/querysets/#update +.. _queryset updates: https://docs.djangoproject.com/en/stable/ref/models/querysets/#update Note: Django 2.2 now allows ``bulk_update``. No ``pre_save`` or ``post_save`` signals are sent still. @@ -170,7 +170,7 @@ Thus, when an ``F()`` expression is used on a model with a history table, the historical model tries to insert using the ``F()`` expression, and raises a ``ValueError``. -.. _here: https://docs.djangoproject.com/en/2.0/ref/models/expressions/#f-expressions +.. _here: https://docs.djangoproject.com/en/stable/ref/models/expressions/#f-expressions Reserved Field Names diff --git a/simple_history/utils.py b/simple_history/utils.py index a5bafeafc..c79e93f75 100644 --- a/simple_history/utils.py +++ b/simple_history/utils.py @@ -95,7 +95,8 @@ def bulk_create_with_history( Bulk create the objects specified by objs while also bulk creating their history (all in one transaction). Because of not providing primary key attribute after bulk_create on any DB except - Postgres (https://docs.djangoproject.com/en/2.2/ref/models/querysets/#bulk-create) + Postgres + (https://docs.djangoproject.com/en/stable/ref/models/querysets/#bulk-create) Divide this process on two transactions for other DB's :param objs: List of objs (not yet saved to the db) of type model :param model: Model class that should be created From fc827645e8189e5d38d7bc0ec6c9e990a2a00840 Mon Sep 17 00:00:00 2001 From: Anders <6058745+ddabble@users.noreply.github.com> Date: Sun, 24 Nov 2024 19:55:03 +0100 Subject: [PATCH 2/2] Replaced a dev Django docs link with stable Also added PR number to the changelog. --- CHANGES.rst | 2 +- CONTRIBUTING.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 28069c0fa..58ed7cfa9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,7 +9,7 @@ Unreleased - Improved performance of the ``latest_of_each()`` history manager method (gh-1360) - Fixed issue with deferred fields causing DoesNotExist error (gh-678) - Added HistoricOneToOneField (gh-1394) -- Updated all djangoproject.com links to reference the stable version +- Updated all djangoproject.com links to reference the stable version (gh-1420) 3.7.0 (2024-05-29) ------------------ diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index f66f96b37..bb76b0143 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -97,4 +97,4 @@ steps: 4. Compile these with ``django-admin compilemessages``. 5. Commit and publish your translations as described above. -.. _translation docs: https://docs.djangoproject.com/en/dev/topics/i18n/translation/#localization-how-to-create-language-files +.. _translation docs: https://docs.djangoproject.com/en/stable/topics/i18n/translation/#localization-how-to-create-language-files