3acb248640741efaf8b6a375e6947cdaae2de76c
6 components
= word
.split(':')
7 if len(components
) == 1:
10 elif components
[0] == "rating":
11 if components
[1].isnumeric():
12 score
= int(components
[1])
14 score
= Rating
.reverse_options
.get(components
[1])
18 # TODO: Find stuff that has this rating
19 # Rating.query.filter(Rating.s)
24 tagtexts
= TagText
.query
.filter(TagText
.text
.in_(tags
))
25 tagtext_ids
= map(lambda x
:x
.id, tagtexts
)
27 # TODO: this is wrong. Please fix it so it returns art that has all the tags.
28 art_tag_pairs
= elixir
.session
.query(Art
,Tag
).filter(Art
.id == Tag
.art_id
).\
29 filter(Tag
.tagtext_id
.in_(tagtext_ids
)).all()
31 # just the art please.
32 c
.artwork
= map(lambda x
: x
[0], art_tag_pairs
)
33 return render('/index.mako')