Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
Make original_name searchable and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanerk committed Apr 23, 2021
1 parent fde8325 commit 5aeff48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ <h1 class="ui header">Changelog</h1>
</div>

<p>Note: Changes from before May 7th 2020 are not recorded on this page</p>
<div id="v21.4.23" class="ui horizontal version divider">v21.4.23</div>
<h3 class="ui header">Added</h3>
<ul>
<li>Added original name to competition. Sometimes I translate competition names, so this way I can store the original name.</li>
<li>Added multi-purpose comment field to competition.</li>
</ul>
<div id="v21.4.8" class="ui horizontal version divider">v21.4.8</div>
<h3 class="ui header">Fixed</h3>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion rankings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def get_file_url(self):
@classmethod
def search(cls, query):
competitions = Competition.objects
vector = SearchVector('name') + SearchVector('location')
vector = SearchVector('name') + SearchVector('original_name') + SearchVector('country') + SearchVector('city')
query = SearchQuery(query)

competitions = competitions.annotate(search=vector).filter(search=query)
Expand Down

0 comments on commit 5aeff48

Please sign in to comment.