From fe3a5556a37011ac1838d10cb5da82171d85036a Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 31 Aug 2011 01:18:20 +0530 Subject: [PATCH] oops --- gazetteer/places/lookups.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gazetteer/places/lookups.py b/gazetteer/places/lookups.py index db1c86f..43e38cc 100644 --- a/gazetteer/places/lookups.py +++ b/gazetteer/places/lookups.py @@ -5,15 +5,15 @@ class FeatureTypeLookup(object): def get_query(self,q,request): """ return a query set. you also have access to request.user if needed """ - return Contact.objects.filter(Q(code__icontains=q) | Q(name__icontains=q)) + return FeatureType.objects.filter(Q(code__icontains=q) | Q(name__icontains=q)) def format_result(self,ftype): """ the search results display in the dropdown menu. may contain html and multiple-lines. will remove any | """ return u"%s: %s" % (ftype.code, ftype.name,) - def format_item(self,contact): + def format_item(self,ftype): """ the display of a currently selected object in the area below the search box. html is OK """ - return unicode(contact) + return unicode(ftype) def get_objects(self,ids): """ given a list of ids, return the objects ordered as you would like them on the admin page.