Skip to content

Conversation

@antoinehashbang
Copy link
Contributor

About this issue: #2302

  • Add a templatetag "gold_corporate_members", similar to the one used in the /download/ page
  • In files "base_community.html" and "base_foundation.html", add a block "content-related-extra" in block "content-related"
  • In files "foundation.html" and "index.html" (template for community page), use this block to call templatetag "gold_corporate_members"
  • Add few tests for this new templatetags
  • update test "test_community_index_number_of_queries" because we have increase the number of queries on this page

@sarahboyce
Copy link
Contributor

Thank you for the PR! This looks great 👍
There's an update on the issue that we should have Gold+ sponsors (#2302 (comment)), do you mind updating?

@SaptakS
Copy link
Contributor

SaptakS commented Nov 18, 2025

@antoinehashbang did you get a chance to make the updates as mentioned in the comment above?

@antoinehashbang
Copy link
Contributor Author

@antoinehashbang did you get a chance to make the updates as mentioned in the comment above?

Hello, not yet, but It should be done until end of week

@antoinehashbang antoinehashbang force-pushed the feat/2302_show_gold_members branch from c114138 to fa7ecde Compare November 27, 2025 09:21
Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates!
In case @cholmes5 wants to take a look this would roughly look like (ignore the random test data...)

Screenshot from 2025-11-27 12-55-00

and

Screenshot from 2025-11-27 12-55-26

@antoinehashbang I think you've missed the following comment about the News page (#2302 (comment))

Also @cholmes5 when you say About pages, do you mean only https://www.djangoproject.com/foundation/ or also other pages like https://www.djangoproject.com/foundation/faq/ ?

Comment on lines +121 to +127


@register.inclusion_tag("fundraising/includes/top_and_gold_corporate_members.html")
def top_and_gold_corporate_members():
members = CorporateMember.objects.by_membership_level()

return {"members": members["diamond"] + members["platinum"] + members["gold"]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding a new template and new tag I think we could make the existing tag more generic like

@register.inclusion_tag("fundraising/includes/top_corporate_members.html")
def top_corporate_members(*levels, header=None):
    """
    Usage: {% top_corporate_members "diamond" "platinum" header="Diamond and Platinum Members" %}
    """

    all_members = CorporateMember.objects.by_membership_level()

    members = []
    for level in levels:
        if level in all_members:
            members += all_members[level]

    return {"header": header, "members": members}

and render the header in the template like <h3>{{ header }}</h3>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants