title: Is it possible to return an HttpResponse in django with text & a json object?
body: <p>In my view function, I'd like to return a json object (data1) and some text/html (form). Is this possible? </p>
  
  <p>Here is part of my <strong>views.py</strong>:</p>
  
  <pre><code>if request.is_ajax() and request.method == 'POST':
  ...
      if form.is_valid():
          answer = form.cleaned_data['answer'] # Answer extracted from form is also a string
          a1 = ques1.correct_answer
                      if a1 == answer:
              test1 = question_list.get(id=nextid)
              form = AnswerForm(test1)
              ques1 = question_list.filter(id=nextid)                     # Filter next question as &lt;qs&gt;
              data1 = serializers.serialize("json",ques1)                 # Json-ize
      # ********EDITED HERE **********        
              variables1 = Context({
                  'form' : form,
                  'q1'   : data1,
              })  
              #response = HttpResponse()
              #response['data1'] = response.write(data1)
              #response['form'] = response.write(form) 
              if nextid &lt;= qsnlen:
                  return HttpResponse(variables1, mimetype="application/json")
                  #return HttpResponse(response)
              else:
  ...
  </code></pre>
  
  <p>I'd like to send back both the form html and the ques1 json object. How can I do this? Thanks in advance. </p>