title: Django-rest-framework tutorial internal server error on getting a particular snippet
body: <p>Following the tutorial part: <code>http://www.django-rest-framework.org/tutorial/1-serialization/#testing-our-first-attempt-at-a-web-api</code></p>
  
  <p>I get an internal server error: <code>[01/Nov/2015 15:36:47] "GET /snippets/2/ HTTP/1.1" 500 27</code> when getting a particular snippet: <code>/snippets/2/</code> getting all snippets with <code>/snippets/</code> works fine.</p>
  
  <p>The record exists and I see nothing special in the data. Debug is telling me:</p>
  
  <pre><code>Traceback:
  File "/Users/xxxx/env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
    151.                                  % (callback.__module__, view_name))
  
  Exception Type: ValueError at /snippets/2/
  Exception Value: The view snippets.views.snippet_detail didn&amp;#39;t return an HttpResponse object. It returned None instead.
  </code></pre>
  
  <p>I put some <code>PRINT</code> statements in <code>views.py</code> around <code>snippet = Snippet.objects.get(pk=pk)</code> like:</p>
  
  <pre><code>@csrf_exempt
  def snippet_detail(request, pk):
  """
  Retrieve, update or delete a code snippet.
  """
  print '====='
  print request
  print pk
  
  try:
      print 'get snippet'
      snippet = Snippet.objects.get(pk=pk)
      print 'snippet = ' + snippet
  except Snippet.DoesNotExist:
      print 'not exist'
      return HttpResponse(status=404)
  </code></pre>
  
  <p>This is what I get in the terminal:</p>
  
  <pre><code>=====
  &lt;WSGIRequest: GET '/snippets/2/'&gt;
  2
  get snippet
  [01/Nov/2015 16:06:10] "GET /snippets/2/ HTTP/1.1" 500 27
  </code></pre>
  
  <p>Server error 500. If I try this:</p>
  
  <pre><code>&gt;&gt;&gt; from snippets.models import Snippet
  &gt;&gt;&gt; from snippets.serializers import SnippetSerializer
  &gt;&gt;&gt; snippet = Snippet.objects.get(pk=2)
  &gt;&gt;&gt; print snippet
  Snippet object
  &gt;&gt;&gt; print snippet.code
  print "hello, world"
  </code></pre>
  
  <p>So everything should be fine... Anything else I could try?</p>