title: How should I show results of BeautifulSoup parsing in Django?
body: <p>I'm trying to scrape a web page using BeautifulSoup and Django. Here's my views.py which do this task:</p>
  
  <pre><code>def detail(request, article_id):
      article = get_object_or_404(Article, pk=article_id)
      html = urllib2.urlopen("...url...")
      soup = BeautifulSoup(html)
      title = soup.title
  
      return render(request, 'detail.html', {'article': article, 'title':title})
  </code></pre>
  
  <p>But when I use {{ title }} in django template files, it doesn't show anything. I've test it and it works in shell. I've added a line to this function:</p>
  
  <pre><code>print soup.title
  </code></pre>
  
  <p>and it prints it every time I reload the page, but it doesn't show up in templates.</p>
  
  <p>The content also displayed very strange for some other commands like: find_all("a") or prettify method. Could anyone tell me how can I print the result of beautifulsoup correctly in django templates?</p>