Commits

Jesper Nøhr committed a8f0d62

cleaning up some code from johnnoonr, accepting his qs fork

  • Participants
  • Parent commits 62a14d3

Comments (0)

Files changed (2)

File piston/doc.py

         return self.handler.__name__
     
     def get_resource_uri_template(self):
-        """URI template processor"""
+        """
+        URI template processor.
+        
+        See http://bitworking.org/projects/URI-Templates/
+        """
         
         def _convert(template, params=[]):
             """URI template converter"""
                 components[i] = value
         
             lookup_view, args, kwargs = components
-        
             lookup_view = get_callable(lookup_view, True)
 
             possibilities = get_resolver(None).reverse_dict.getlist(lookup_view)
                             continue
                         return _convert(result, params)
         except:
-            pass
-        
-        return None
+            return None
         
     resource_uri_template = property(get_resource_uri_template)
     

File piston/emitters.py

             
             if isinstance(thing, QuerySet):
                 ret = _qs(thing, fields=fields)
-            elif isinstance(thing, (tuple, list, QuerySet)):
+            elif isinstance(thing, (tuple, list)):
                 ret = _list(thing)
             elif isinstance(thing, dict):
                 ret = _dict(thing)