Ejemplo n.º 1
0
 def ret(self, cat, *a, **kw):
     if not cat and self.current_category:
         cat = self.current_category
         return fn(self, cat, *a, **kw)
     elif cat and Category.exists(cat):
         cat = Category.get(cat)
         return fn(self, cat, *a, **kw)            
     elif cat and not Category.exists(cat):
         print "category %s not found. try 'categories'?" % cat
     else:
         print "must specify a category. try 'categories'?"