def show(self, name): user = request.environ["user"] if name not in ['Stan', 'Linn', 'Joseph']: abort(404) output = Person(name) # don't show personal information to any joe schmoe if user.may_see(self, "restricted"): output.sisters = [Person('Suzanne'), Person('Joanne')] output.sisters[1].age = 33 output.classes = ['Anthropology', 'Econ 101'] return api.formatted_response( output, html_template='people/person.html', formats=['json', 'yaml', 'html', 'xml'] )
def show(self): return api.formatted_response({})