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

        Args:
            searchtemplate_id: Primary key for a search template database model

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

        Args:
            searchtemplate_id: Primary key for a search template database model

        Returns:
            Search template in JSON (instance of flask.wrappers.Response)
        """
        searchtemplate = SearchTemplate.query.get(searchtemplate_id)

        meta = {'sketch_ids': []}
        saved_searches = View.query.filter_by(
            searchtemplate=searchtemplate)
        for saved_search in saved_searches:
            meta['sketch_ids'].append(saved_search.id)

        if not searchtemplate:
            abort(HTTP_STATUS_CODE_NOT_FOUND, 'Search template was not found')
        return self.to_json(searchtemplate, meta=meta)
def get ( self , searchtemplate_id ) : searchtemplate = SearchTemplate . query . get ( searchtemplate_id ) meta = { 'sketch_ids' : [ ] } saved_searches = View . query . filter_by ( searchtemplate = searchtemplate ) for saved_search in saved_searches : meta [ 'sketch_ids' ] . append ( saved_search . id ) if not searchtemplate : abort ( HTTP_STATUS_CODE_NOT_FOUND , 'Search template was not found' ) return self . to_json ( searchtemplate , meta = meta )