How do I insert a django form in twitter bootstrap

2019-02-24 21:52发布

I am trying to display a django form within a twitter bootstrap modal window but with no luck. I am fairly new to javascript, bootstrap and django. So far the modal window is launching OK but the registration form is being displayed. I feel like I am missing something obvious. Any help will be appreciated

<div id="mReg" class="modal fade">
     <div class="modal-header">
          <h3>STEP 1: User registration</h3>
      </div>
      <div class="modal-body">
         <form method="post" action=".">
            {% csrf_token %}
            {{ reg_form.as_p }}
          </form>
      </div>    
      <div class="modal-footer">         
          <a href="#" class="btn primary">Next</a>
      </div>
  </div>

0条回答
登录 后发表回答