Skip to content

⭐ Liked packages aka Most liked packages #1286

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

Open
jefftriplett opened this issue Oct 7, 2024 · 2 comments · May be fixed by #1330
Open

⭐ Liked packages aka Most liked packages #1286

jefftriplett opened this issue Oct 7, 2024 · 2 comments · May be fixed by #1330
Assignees

Comments

@jefftriplett
Copy link
Contributor

Now that we have a Favorite app and model, we should aggregate them by Package with a count(User) with a limit of 20 or 25 and see which packages users like the best.

@FarhanAliRaza FarhanAliRaza self-assigned this Oct 30, 2024
@FarhanAliRaza
Copy link
Contributor

Should the liked packages be featured on home page like the latest or random packages.
I think we can do this like this

most_liked_packages = (
        Package.objects.active()
        .exclude(repo_description__in=[None, ""])
        .order_by("-favorite_count")[:5]
    )

ryancheley added a commit that referenced this issue Nov 10, 2024
jefftriplett pushed a commit that referenced this issue Nov 11, 2024
* Added a string rep of favorite
Refs #1286

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@jefftriplett
Copy link
Contributor Author

@FarhanAliRaza It probably depends on how much data we have. The latest might just be one user's feed as they pick things.

@FarhanAliRaza FarhanAliRaza linked a pull request Jan 9, 2025 that will close this issue
@ryancheley ryancheley added this to the Favorite Package feature milestone Jan 26, 2025
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 a pull request may close this issue.

3 participants