title: jQuery parsererror on simple JSON returned from Django
body: <p>I'm doing a pretty simple thing here, making a POST request to Django from jQuery, and I'm getting a strange error for a pretty simple scenario. I have the following view function:</p>
  
  <pre><code>from django.views.generic.simple import direct_to_template as dto
  
  def do_login(request):
      if request.method == "POST":
          return dto(request, "path/to/template.json", {
              'success': False,
              'cause': None
          }, mimetype="text/json")
  </code></pre>
  
  <p>Here's my template:</p>
  
  <pre><code>{ success : {{success|lower}}{% if cause %}, cause : {{cause}}{% endif %} }
  </code></pre>
  
  <p>...and here's my jQuery:</p>
  
  <pre><code>$.ajax("/login/", { type: "POST",
      data: $("#loginForm").serialize(),
      success: function(data) {
          console.log("login response: " + data);
      },
      error: function(data, stats, error) {
          console.log("login fault: " + data + ", " + 
                  stats + ", " + error);
      }
  });
  </code></pre>
  
  <p>Pretty simple, right? Here's what I get in the console:</p>
  
  <pre><code>login fault: [object Object], parsererror, SyntaxError: Unexpected token s
  </code></pre>
  
  <p>What's going wrong here? If I don't set the <code>mimetype</code> on my render method, then everything works fine. The problem is, I'd like to return JSON without having to force jQuery to reparse it. Can anyone spot my mistake here? I can't seem to see it.</p>