Skip to content

Commit 15c423f

Browse files
committed
django-upgrade --target-version 5.2
1 parent dac9d96 commit 15c423f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

sponsors/admin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ def get_prepopulated_fields(self, request, obj=None):
201201
return {'slug': ['name']}
202202
return {}
203203

204+
@admin.display(
205+
description="Revenue split"
206+
)
204207
def get_benefit_split(self, obj: SponsorshipPackage) -> str:
205208
colors = [
206209
"#ffde57", # Python Gold
@@ -223,7 +226,6 @@ def get_benefit_split(self, obj: SponsorshipPackage) -> str:
223226
html = f"<div style='{style}'>{''.join(spans)}</div>"
224227
return mark_safe(html)
225228

226-
get_benefit_split.short_description = "Revenue split"
227229

228230

229231
class SponsorContactInline(admin.TabularInline):

successstories/tests/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_draft(self):
2121
def test_featured(self):
2222
featured_stories = Story.objects.featured()
2323
expected_repr = [f'<Story: {self.story3.name}>']
24-
self.assertQuerysetEqual(featured_stories, expected_repr, transform=repr)
24+
self.assertQuerySetEqual(featured_stories, expected_repr, transform=repr)
2525

2626
def test_get_admin_url(self):
2727
self.assertEqual(self.story1.get_admin_url(),

templates/sitetree/breadcrumbs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% load sitetree %}
2-
{% if sitetree_items|length_is:"1" %}
2+
{% if sitetree_items|length == 1 %}
33
{% else %}
44
<ul class="breadcrumbs menu">
55
{% for item in sitetree_items %}

0 commit comments

Comments
 (0)