summaryrefslogtreecommitdiff
path: root/django/contrib/admin/options.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/admin/options.py')
-rw-r--r--django/contrib/admin/options.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index f051c79ac9..b1aa610d43 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -1276,7 +1276,9 @@ class ModelAdmin(BaseModelAdmin):
"has_add_permission": self.has_add_permission(request),
"has_change_permission": self.has_change_permission(request, obj),
"has_delete_permission": self.has_delete_permission(request, obj),
- "has_editable_inline_admin_formsets": has_editable_inline_admin_formsets,
+ "has_editable_inline_admin_formsets": (
+ has_editable_inline_admin_formsets
+ ),
"has_file_field": context["adminform"].form.is_multipart()
or any(
admin_formset.formset.is_multipart()
@@ -1383,7 +1385,8 @@ class ModelAdmin(BaseModelAdmin):
elif "_addanother" in request.POST:
msg = format_html(
_(
- "The {name} “{obj}” was added successfully. You may add another {name} below."
+ "The {name} “{obj}” was added successfully. You may add another "
+ "{name} below."
),
**msg_dict,
)
@@ -1444,7 +1447,8 @@ class ModelAdmin(BaseModelAdmin):
if "_continue" in request.POST:
msg = format_html(
_(
- "The {name} “{obj}” was changed successfully. You may edit it again below."
+ "The {name} “{obj}” was changed successfully. You may edit it "
+ "again below."
),
**msg_dict,
)
@@ -1458,7 +1462,8 @@ class ModelAdmin(BaseModelAdmin):
elif "_saveasnew" in request.POST:
msg = format_html(
_(
- "The {name} “{obj}” was added successfully. You may edit it again below."
+ "The {name} “{obj}” was added successfully. You may edit it again "
+ "below."
),
**msg_dict,
)
@@ -1476,7 +1481,8 @@ class ModelAdmin(BaseModelAdmin):
elif "_addanother" in request.POST:
msg = format_html(
_(
- "The {name} “{obj}” was changed successfully. You may add another {name} below."
+ "The {name} “{obj}” was changed successfully. You may add another "
+ "{name} below."
),
**msg_dict,
)
@@ -2389,8 +2395,9 @@ class InlineModelAdmin(BaseModelAdmin):
objs = []
for p in collector.protected:
objs.append(
- # Translators: Model verbose name and instance representation,
- # suitable to be an item in a list.
+ # Translators: Model verbose name and instance
+ # representation, suitable to be an item in a
+ # list.
_("%(class_name)s %(instance)s")
% {"class_name": p._meta.verbose_name, "instance": p}
)