Visitar URL original
Place sponsors logos via templatetag by berinhard · Pull Request #1822 · python/pythondotorg · GitHub
The Wayback Machine - https://web.archive.org/web/20250617125059/https://github.com/python/pythondotorg/pull/1822
Skip to content

Place sponsors logos via templatetag #1822

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

Merged
merged 19 commits into from
Aug 2, 2021
Merged

Conversation

berinhard
Copy link
Contributor

@berinhard berinhard commented Jul 23, 2021 •

This PR introduces the backend work required to facilitate the work on #1806.

It introduces a new templatetag from the sponsors app called list_sponsors. This template tag renders a partial HTML accordingly to the type of logo place/publisher that was passed.

The DB configuration to QA and test this can be tricky, though. To display a logo at downloads page, for example, the sponsor must have:

  • A FINALIZED sponsorship with an active date period (today is between start/end dates)
  • One of the SponorBenefit entries associated to that sponsorship must have a LogoPlacement feature configured using the values defined by LogoPlaceChoices and PublisherChoices enumerators.

Update related sponsorships

Here is the interface to update all related sponsorships from a the sponsorship benefit detail page:

Screenshot from 2021-07-30 11-34-50
Screenshot from 2021-07-30 11-35-22

I didn't add print for the sponsor placement because I don't know if it's a good idea to display sponsors logos within this PR.

@berinhard berinhard force-pushed the feature/logo-placement-templatetag branch from 741a130 to a214cf1 Compare July 30, 2021 14:36
@berinhard berinhard marked this pull request as ready for review July 30, 2021 14:39
@berinhard berinhard requested a review from ewdurbin July 30, 2021 14:39
@berinhard
Copy link
Contributor Author

@ewdurbin this PR is ready for a final review! I don't know why Github is warning me about a conflict because I've already ran a git rebase on top of the most up to date version from the main branch. Let me know if I'm missing something here.

@berinhard berinhard force-pushed the feature/logo-placement-templatetag branch from a214cf1 to 844abf0 Compare July 30, 2021 14:42
@berinhard
Copy link
Contributor Author

My bad on the conflict warning. I fixed it already 👍

@ewdurbin ewdurbin merged commit 8467a50 into main Aug 2, 2021
@ewdurbin ewdurbin deleted the feature/logo-placement-templatetag branch August 2, 2021 20:25
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.

2 participants