Commits

Mark Lavin  committed fa6efa6

Change example lookups to new style.

  • Participants
  • Parent commits 09779e1
  • Branches multi-field-lookups

Comments (0)

Files changed (1)

File example/core/lookups.py

 
 class FruitLookup(ModelLookup):
     model = Fruit
-    search_field = 'name__icontains'
+    search_fields = ('name__icontains', )
 
 registry.register(FruitLookup)
 
 
 class OwnerLookup(ModelLookup):
     model = User
-    search_field = 'username__icontains'
+    search_fields = ('username__icontains', )
 
 
 registry.register(OwnerLookup)
 
 class CityLookup(ModelLookup):
     model = City
-    search_field = 'name__icontains'
+    search_fields = ('name__icontains', )
 
     def get_query(self, request, term):
         results = super(CityLookup, self).get_query(request, term)