def view_of(cls):
 def view_of_decorator(view_cls):
  cls._views.append(view_cls)
  view_cls._view_of = cls
  return view_cls
 return view_of_decorator

def view_of ( cls ) : def view_of_decorator ( view_cls ) : cls . _views . append ( view_cls ) view_cls . _view_of = cls return view_cls return view_of_decorator
register a class as a view of a thing .