-
-
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>
About this issue: #2302