Skip to content
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

Optimization PR#1 - Featured competitions #1678

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ihsaan-ullah
Copy link
Collaborator

@ihsaan-ullah ihsaan-ullah commented Nov 21, 2024

@ mention of reviewers

@Didayolo

A brief description of the purpose of the changes contained in this PR.

  • is_featured field added in competition modal (default = False)
  • This field is now used to show featured competitions on the home page

NOTE: participants count is still missing here, that will be handled by PR#2

How to make a competition featured?

There are two ways to do it

  1. User Django admin -> click the competition -> scroll down to is featured filed -> Check/Uncheck it
  2. Use competition id in the django bash to feature/unfeature a competitions
docker compose exec django ./manage.py shell_plus
>>> comp = Competition.objects.get(id=<ID>)  # replace <ID> with competition id
>>> comp.is_featured = True  # set to False if you want to unfeature a competition
>>> comp.save()

Issues this PR resolves

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@Didayolo
Copy link
Member

I guess it makes sense that featured competitions are manually selected. We need to remember to update it regularly.

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