oops
This commit is contained in:
parent
2438b51c1c
commit
fe3a5556a3
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user