0

I have a problem with the modal and django form, i try a lot of thing and still doesn't show up the form in the modal, i have this

main.html

<html>
...

<button class="btn btn-info" data-toggle="modal"  data-target="#contactModal">Añadir Nuevo Cake</button>

{% include 'nuevocake2.html' %}

...
</html>

nuevocake2.html

<div class="modal" id="contactModal" >
<form class="well" method="post" action="/nuevocake"  enctype="multipart/form-data">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">×</button>
    <h3>Añadir nuevo Cake</h3>
  </div>
  <div class="modal-body">
        {% csrf_token %}
       {{ formulario.as_p }}
  </div>
  <div class="modal-footer">
       <input class="btn btn-primary" type="submit" value="Save" />
  </div>
</form>
</div>

I already see this post How do I insert a django form in twitter-bootstrap modal window? and i follow the same steps and nothing, if anyone can help me i appreciate it, if you need more data or code let me know

EDIT: I cut all the Django/python code because is not the problem here, if anyone need to see it, let me know and i'll put it back.

Community
  • 1
  • 1
urdaneta88
  • 43
  • 7
  • Does it show up in the html? (i.e. is this a Django template rendering issue or a bootstrap issue?) – thebjorn Aug 14 '14 at 20:56
  • Yeah the form show up in the html but not in the modal – urdaneta88 Aug 14 '14 at 21:00
  • Then you should probably prune your question of everything but the html since this problem doesn't sound like it has anything to do with Django or Python (it will also make it much easier for someone knowledgable in bootstrap to come up with an answer). – thebjorn Aug 14 '14 at 21:03
  • 1
    If you're using Bootstrap v3, your HTML is missing `modal-dialog` and `modal-content` divs. – cvrebert Aug 14 '14 at 22:58

0 Answers0