Skip to content

Commit

Permalink
Fixed sponsor notes appearing on download page
Browse files Browse the repository at this point in the history
Thanks to user TheEpic-dev on the forum for reporting
the issue.

This was introduced in c024b32
  • Loading branch information
bmispelon committed Nov 22, 2024
1 parent 18898bc commit 5537f96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion djangoproject/templates/releases/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ <h2>Diamond and Platinum Members</h2>
<ul class="list-links-small">
<li><strong>{{ obj.display_name }}</strong></li>
<li><a href="{{ obj.url }}" title="{{ obj.display_name }}">
{{ obj.notes }}
{{ obj.description }}
</a></li>
</ul>
</div>
Expand Down
8 changes: 4 additions & 4 deletions releases/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def make_member(self, level, level_name):
display_name=f"{level_name} Member",
url=f"https://{level_name.lower()}.example.com",
membership_level=level,
notes=f"Some notes about this {level_name} member",
description=f"Some notes about this {level_name} member",
)
# ensure each member is included in `for_public_display`
member.invoice_set.create(
Expand All @@ -195,13 +195,13 @@ def test_diamond_and_platinum_members_shown(self):

self.assertContains(response, "<h2>Diamond and Platinum Members</h2>")
member_link = (
lambda m: f'<a href="{m.url}" title="{m.display_name}">{m.notes}</a>'
lambda m: f'<a href="{m.url}" title="{m.display_name}">{m.description}</a>'
)
for member in members:
if member.membership_level < PLATINUM_MEMBERSHIP:
self.assertNotContains(response, member.display_name)
self.assertNotContains(response, member.url)
self.assertNotContains(response, member.notes)
self.assertNotContains(response, member.description)
else:
self.assertContains(response, member_link(member), html=True)

Expand All @@ -218,4 +218,4 @@ def test_no_diamond_and_platinum_members(self):
for member in members:
self.assertNotContains(response, member.display_name)
self.assertNotContains(response, member.url)
self.assertNotContains(response, member.notes)
self.assertNotContains(response, member.description)

0 comments on commit 5537f96

Please sign in to comment.