def preview(req): url = req.GET.get("url", None) data = { "preview": url_to_html(url), "url": url } return http.HttpResponse( json.dumps(data), mimetype="application/json")
def embed(url): """ Return an HTML fragment to embed the content found at ``url``. """ return url_to_html(url)
def preview(req): url = req.GET.get("url", None) data = {"preview": url_to_html(url), "url": url} return http.HttpResponse(json.dumps(data), mimetype="application/json")