title: How can I show a formset in Django with a AJAX success function?
body: <p>For example if I have the following Ajax request:</p>
  
  <pre><code>$.ajax({
          type: "POST",
          url: url,
          traditional : true,
          data: { csrfmiddlewaretoken: $('input[name=csrfmiddlewaretoken]').val(),
                  data: data,
           },
  
      success: function(data){
          var html_text =` &lt;div&gt;
              {% for form in formset %}
                  {{form.as_p}}
              {% endfor %}
              &lt;/div&gt; `
          $("#formset-div").append(html_text);
  
          }
      });
  </code></pre>
  
  <p>I always get just text in the div after execute Ajax <strong>success</strong> function</p>
  
  <p>How can I show form set with the created data that created by the python function that executed with the Ajax request?</p>