Commits

Luke Plant committed f50c651

Moved some code to correct Filter subclass

Comments (0)

Files changed (1)

django_easyfilters/filters.py

         """
         return choices
 
-    def display_choice(self, choice):
-        retval = unicode(choice)
-        if retval == u'':
-            return u'(empty)'
-        else:
-            return retval
-
     def get_choices(self, qs, params):
         """
         Returns a list of namedtuples containing (label (as a string), count,
     """
     Fallback Filter for various kinds of simple values.
     """
+    def display_choice(self, choice):
+        retval = unicode(choice)
+        if retval == u'':
+            return u'(empty)'
+        else:
+            return retval
+
     def get_choices_add(self, qs, params):
         """
         Called by 'get_choices', this is usually the one to override.