projects
/
zzz-floof.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
36dba08
2037925
)
merged conflicting stuff. Added 'me' tag
author
Nick Retallack
<nickretallack@gmail.com>
Mon, 7 Dec 2009 02:31:22 +0000
(18:31 -0800)
committer
Nick Retallack
<nickretallack@gmail.com>
Mon, 7 Dec 2009 02:31:22 +0000
(18:31 -0800)
1
2
floof/lib/tags.py
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
floof/lib/tags.py
index
9bfdf04
,
104fe65
..
d2adafc
---
1
/
floof/lib/tags.py
---
2
/
floof/lib/tags.py
+++ b/
floof/lib/tags.py
@@@
-1,7
-1,5
+1,10
@@@
from floof.model import Art, ArtUser, ArtUserType, Tag, TagText, User
+import elixir
+from dbhelpers import find_or_create
+import re
++
++from pylons import c
+
def parse(search_string):
"""Parses a search query, and returns a query object on Art.
@@@
-25,6
-23,6
+28,8
@@@
# This is a special tag; at the moment, by/for/of to indicate
# related users
prefix, tag = tag.split(':', 1)
++ if tag == 'me':
++ tag = c.user.name
# XXX what to do if this fails? abort? return empty query?
target_user = User.get_by(name=tag)