def get(self): (url, url_linktext) = get_login_url_and_text(self.request.uri) search_query = Search.query().order(-Search.date) search_query = search_query.fetch(10) template_values = { 'searches': search_query, 'url': url, 'url_linktext': url_linktext, } self.response.write(render_template('storage.html', **template_values))
def __get_user_last_searches(self, size): user_id = self.__get_user_id() search_query = Search.query( ancestor=Search.default_parent_key(user_id)).order(-Search.date) return search_query.fetch(size)