From: Nick Retallack Date: Mon, 7 Dec 2009 02:31:22 +0000 (-0800) Subject: merged conflicting stuff. Added 'me' tag X-Git-Url: http://git.veekun.com/zzz-floof.git/commitdiff_plain/a6d7a53b0cc7a8f8629e8e1272a56d3c51179317?hp=-c merged conflicting stuff. Added 'me' tag --- a6d7a53b0cc7a8f8629e8e1272a56d3c51179317 diff --combined floof/lib/tags.py index 9bfdf04,104fe65..d2adafc --- a/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)