Created
May 26, 2019 18:09
-
-
Save ttamg/c2eb5774f6abbbf098ba0186215c1d7b to your computer and use it in GitHub Desktop.
Django form template to fill out the modal window and load the ajax_post.js script to manage the submission of the form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="submitByAJAX"> | |
<form method="POST" action="{% url 'message_new' %}"> | |
{% csrf_token %} | |
{{ form }} | |
<button type="submit" value="submit" class="btn">Submit</button> | |
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> | |
</form> | |
</div> | |
<script> | |
{% include 'ajax/ajax_post.js' %} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment