(self)
return self.to_json(templates, meta=meta)
Handles GET request to the resource.

        Returns:
            View in JSON (instance of flask.wrappers.Response)
Handles GET request to the resource.
Handles GET request to the resource .
def get(self):
        """Handles GET request to the resource.

        Returns:
            View in JSON (instance of flask.wrappers.Response)
        """
        templates = SearchTemplate.query.all()
        meta = {
            'collection': []
        }
        for template in templates:
            saved_searches = View.query.filter_by(
                searchtemplate=template)
            for saved_search in saved_searches:
                data = {
                    'search_id': saved_search.id,
                    'template_id': template.id,
                    'sketch_id': saved_search.sketch.id
                }
                meta['collection'].append(data)

        return self.to_json(templates, meta=meta)
def get ( self ) : templates = SearchTemplate . query . all ( ) meta = { 'collection' : [ ] } for template in templates : saved_searches = View . query . filter_by ( searchtemplate = template ) for saved_search in saved_searches : data = { 'search_id' : saved_search . id , 'template_id' : template . id , 'sketch_id' : saved_search . sketch . id } meta [ 'collection' ] . append ( data ) return self . to_json ( templates , meta = meta )