Skip to content

Commit

Permalink
feat: remove intros from posts search + new achievement
Browse files Browse the repository at this point in the history
  • Loading branch information
vas3k committed Oct 30, 2024
1 parent 8938a90 commit 1317e84
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/data/achievements.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,12 @@
"image": "https://vas3k.club/static/images/achievements/vas3k_flot_2024.png",
"style": "background-color: #4c98d5; font-size: 120%;",
}),
("grill_master", {
"name": "Гриль Мастер",
"description": "Пожарил ребятам вкуснейших мяс на клубной сходке",
"image": "https://vas3k.club/static/images/achievements/grill_master.png",
"style": "background-color: #EA780E; font-size: 130%;",
}),
]

# VIP: https://i.vas3k.club/3cb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def search(request):
else:
content_type = None

# hack: exclude intros from posts page
if content_type == "post":
results = results.exclude(post__type="intro")

# exclude all deleted comments
results = results.exclude(comment__isnull=False, comment__is_deleted=True)

Expand Down

0 comments on commit 1317e84

Please sign in to comment.