Skip to content

hidden user score#155

Merged
yakser merged 6 commits into
devfrom
feature/hidden-user-score
Jul 3, 2023
Merged

hidden user score#155
yakser merged 6 commits into
devfrom
feature/hidden-user-score

Conversation

@VeryBigSad
Copy link
Copy Markdown
Contributor

Скрытый скор для юзеров, чтобы заполненные профили появлялись сверху

считает его так:

score = 0
        if self.avatar:
            score += 10
        if self.key_skills:
            score += 7
        if self.about_me:
            score += 6
        if self.region:
            score += 4
        if self.city:
            score += 4
        if self.organization:
            score += 6
        if self.speciality:
            score += 7

@VeryBigSad VeryBigSad requested a review from yakser July 3, 2023 21:22
Comment thread users/admin.py
"city",
)

readonly_fields = ("ordering_score",)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мб переименовать в hidden_score

Comment thread users/models.py

objects = CustomUserManager()

def calculate_ordering_score(self) -> int:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вынести куда нибудь в service.py

@yakser yakser merged commit 7e493d0 into dev Jul 3, 2023
@yakser yakser deleted the feature/hidden-user-score branch September 8, 2023 16:08
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