def get_content_or_404(id): """ Return content entity or abort with HTTP 404 if none is found. :param id: id of the content :returns: ``Content`` object """ content = Content.get_cached(id) if not content: abort(404) return content
def get_content_or_404(urlid): content = Content.get_cached(urlid) if not content: abort(404) return content