mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-24 17:06:18 -05:00
Ordering results by columns.
This commit is contained in:
parent
d0de92ef7e
commit
984aa04f0a
2 changed files with 2 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ class File(ModelHelper, Base):
|
|||
title = deferred(Column(String)) # used by textsearch column
|
||||
|
||||
textsearch = deferred(
|
||||
Column(tsvector, Computed('''to_tsvector('english'::regconfig, title)''')))
|
||||
Column(tsvector, Computed('''setweight(to_tsvector('english'::regconfig, title), 'A'::"char")''')))
|
||||
|
||||
def __repr__(self):
|
||||
return f'<File id={self.id} path={self.path.relative_to(get_media_directory())} mime={self.mimetype}>'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue