-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: Add gold members on pages foundation and community #2305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Add gold members on pages foundation and community #2305
Conversation
|
Thank you for the PR! This looks great 👍 |
|
@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 |
c114138 to
fa7ecde
Compare
There was a problem hiding this 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...)
and
@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/ ?
|
|
||
|
|
||
| @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"]} |
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generic tag will also be useful for #2371, since it means we can reuse it for the blog.
|
I talked with @cholmes5 in slack and she is ok with showing the sponsors at the top in all pages in the community and foundation sections, the way it is right now on the screenshots. Once @sarahboyce comment is addressed, this should be ready to merge. @antoinehashbang Will you be able to address @sarahboyce comment soon? If now, is it a problem if a maintainer addresses it? It's only to finally get it done and live, not to remove any credit from you. |
fa7ecde to
c403b6a
Compare
About this issue: #2302