예제 #1
0
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")
예제 #2
0
def embed(url):
    """
  Return an HTML fragment to embed the content found at ``url``.
  """

    return url_to_html(url)
예제 #3
0
def embed(url):
  """
  Return an HTML fragment to embed the content found at ``url``.
  """

  return url_to_html(url)
예제 #4
0
파일: views.py 프로젝트: wwjimd/HunchWorks
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")