title: include bootstrap modal template with template tags
body: <p>I'm trying to create a bootstrap modal that can be included in my html files since I'm putting forms in modal and I don't want to create a new mdoal everytime.</p>
  
  <p>It works fine, except for trying to include the form. Which is of course the important part. How could I include a template context variable inside a template tag?</p>
  
  <p>modal_base</p>
  
  <pre><code> {% load crispy_forms_tags %}
  &lt;div id="{{ modal_form_id }}" class="modal fade" ariahidden="True"&gt;
      &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;a class="close" data-dismiss="modal"&gt;X&lt;/a&gt;
                  &lt;h1 style="text-align:center;"&gt;
                      {{ modal_form_title }}
                  &lt;/h1&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  &lt;form method="{{modal_form_method|default:'POST'}}" action="{{modal_form_action}}"&gt;
                      {% csrf_token %}
                      {{ form|crispy }}
                      &lt;input class="btn btn-primary" type="submit" value="Create"/&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;a href="#" class="btn btn-danger" data-dismiss="modal"&gt;
                      Cancel
                  &lt;/a&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;  
  </code></pre>
  
  <p>Example include in some html file:</p>
  
  <pre><code> {% include 'modal_form.html' with modal_form_id="new-category" modal_form_title="Create a New Category" modal_form_method="POST" modal_form_action="/home/" form={{category_form}} %}
  </code></pre>
  
  <p>form = {{category_form}} is the issue. Is there a way to get around this?
  The modal renders fine, opens closes etc I just can't pass in the form</p>