Пример #1
0
    def get(self):
        people = PeopleModel.find_all()
        people = [person.person for person in people]

        messages = MessageModel.find_all()
        headers = {'Content-Type': 'text/html'}
        matrices = DrawingModel.find_all()
        for i in matrices:
            print(i.json())
        return make_response(render_template('home.html',
                                             people=people,
                                             messages=messages,
                                             title="DistancePi",
                                             matrices=DrawingModel.find_all()
                                             ),
                             200,
                             headers
                             )
Пример #2
0
 def get(self):
     return {'people': [x.json() for x in PeopleModel.find_all()]}, 200