@search is working now, aside from the flag search.

This commit is contained in:
Greg Taylor 2009-01-22 14:49:58 +00:00
parent a7a3a33334
commit 377844f1c6
3 changed files with 206 additions and 0 deletions

View file

@ -150,6 +150,9 @@ class ObjectManager(models.Manager):
searcher: (Object) The object doing the searching.
ostring: (string) The alias string to search for.
"""
if ostring.lower().strip() == "me":
return searcher
Attribute = ContentType.objects.get(app_label="objects",
model="attribute").model_class()
results = Attribute.objects.select_related().filter(attr_name__exact="ALIAS").filter(attr_value__iexact=ostring)