title: Return multiple items from a Django View (ajax)
body: <p>I have a function on my page that uses ajax. The ajax goes to a Django view, which can then return some sort of data for me. Unfortunately, I can only get it to return one piece of data at the moment. The second gets returned as the string "success". Here's what I have going:</p>
  
  <p>Ajax:</p>
  
  <pre><code> success: function(data, message) { 
              if(data === 'False'){
                      $('#mailsquare').css('background-color', '#A80000');
                      $('.dropdown-menu').prepend('&lt;li class="message" id="{{item.id}}"&gt;'+message.substring(0,30)+'&lt;/li&gt;');
              } else {
                      $('#mailsquare').css('background-color', '#1b1b1b');
              }
     },
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>@login_required
  def checkMail(request):
  
      user = request.user.get_profile()
  
      i = inbox.objects.get(user = user)
      read = i.read
  
      new = i.message.order_by('created')[:1]
  
      return HttpResponse(read, new)
  </code></pre>
  
  <p>The prepend statement doesn't use the "message" value that it is receiving, but rather just inserts the string "success". The "data" parameter is handled correctly.</p>