Skip to content

Migrate all Sponsor data to the database. #9503

@ewdurbin

Description

@ewdurbin

What's the problem this feature will solve?

Currently due to copyright and trademarks that are incompatible with the license of this repository, PyPI uses a private repository pypi-theme to store Sponsor logos.

These logos are rendered on the sponsors page using this template and this include.

We also render them in the footer using this include which references the dataset in the aforementioned include.

And finally we render a subset of sponsor logos in the sidebar again using the same aforementioned include.

At this point, the only reason we have the pypi-theme repo is to house the Sponsor logos.

This makes @di and myself a bottleneck in updating sponsors and their logos on pypi.org.

Describe the solution you'd like

We should create a Sponsor model in the warehouse database that stores all of the various information encoded into the sponsors include, as well as the ability to store an image in our object store that can later be referenced when rendering the page.

Then, we should update the rendering of sponsor logos throughout the site to use this model.

Additionally a new is_sponsor_admin column should be added to the User model which we will use to grant a new permission sponsor_admin in the admin views to a newly created admin panel to manage Sponsors. Users with sponsor_admin permissions should only be able to make changes to the Sponsor objects. You can see a similar behavior for the moderator/is_moderator permission/column in the admin app.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions