From 2410ace701781a813a44e7d7cf4659df31bba120 Mon Sep 17 00:00:00 2001 From: seanhelvey Date: Fri, 13 Dec 2024 18:37:26 -0800 Subject: [PATCH] Fix get_context formatting. --- django/contrib/admin/widgets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index 6f3036bed5..9dea958efa 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -313,7 +313,11 @@ class RelatedFieldWidgetWrapper(forms.Widget): ) def get_context(self, name, value, attrs): - from django.contrib.admin.views.main import IS_POPUP_VAR, SOURCE_MODEL_VAR,TO_FIELD_VAR + from django.contrib.admin.views.main import ( + IS_POPUP_VAR, + SOURCE_MODEL_VAR, + TO_FIELD_VAR, + ) rel_opts = self.rel.model._meta info = (rel_opts.app_label, rel_opts.model_name)