diff --git a/pkgs/development/python-modules/django/5.nix b/pkgs/development/python-modules/django/5.nix index 3dcf8217e327..c79c8a7f8c34 100644 --- a/pkgs/development/python-modules/django/5.nix +++ b/pkgs/development/python-modules/django/5.nix @@ -72,6 +72,12 @@ buildPythonPackage rec { url = "https://github.com/django/django/commit/12f4f95405c7857cbf2f4bf4d0261154aac31676.patch"; hash = "sha256-+K20/V8sh036Ox9U7CSPgfxue7f28Sdhr3MsB7erVOk="; }) + + # fix regression which breaks django-import-export + # https://github.com/django-import-export/django-import-export/pull/2045 + # https://github.com/django/django/pull/19233 + # manual backport because commit doesn't apply on stable cleanly + ./Restored-single_object-rgument-to-LogEntry-objects-log_actions.diff ] ++ lib.optionals withGdal [ (replaceVars ./django_5_set_geos_gdal_lib.patch { diff --git a/pkgs/development/python-modules/django/Restored-single_object-rgument-to-LogEntry-objects-log_actions.diff b/pkgs/development/python-modules/django/Restored-single_object-rgument-to-LogEntry-objects-log_actions.diff new file mode 100644 index 000000000000..6831797f1fda --- /dev/null +++ b/pkgs/development/python-modules/django/Restored-single_object-rgument-to-LogEntry-objects-log_actions.diff @@ -0,0 +1,15 @@ +diff --git a/django/contrib/admin/models.py b/django/contrib/admin/models.py +index 345b8cf341..2ed78d775b 100644 +--- a/django/contrib/admin/models.py ++++ b/django/contrib/admin/models.py +@@ -51,7 +51,9 @@ def log_action( + change_message=change_message, + ) + +- def log_actions(self, user_id, queryset, action_flag, change_message=""): ++ def log_actions( ++ self, user_id, queryset, action_flag, change_message="", *, single_object=False ++ ): + # RemovedInDjango60Warning. + if type(self).log_action != LogEntryManager.log_action: + warnings.warn(