Posts

Showing posts with the label Jquery.

How to use Django Bootstrap Modal Forms

Image
Installation Install  django-bootstrap-modal-forms : $ pip install django-bootstrap-modal-forms Add  bootstrap_modal_forms  to your INSTALLED_APPS in settings.py: INSTALLED_APPS = [ ... 'bootstrap_modal_forms', ... ] Include Bootstrap, jQuery and  jquery.bootstrap.modal.forms.js  on every page where you would like to set up the AJAX driven Django forms in Bootstrap modal. IMPORTANT: Adjust Bootstrap and jQuery file paths to match yours, but include  jquery.bootstrap.modal.forms.js  exactly as in code bellow. < head > < link rel = " stylesheet " href = " {% static 'assets/css/bootstrap.css' %} " > </ head > < body > < script src = " {% static 'assets/js/bootstrap.js' %} " ></ script > < script src = " {% static 'assets/js/jquery.js' %} " ></ script > < script src = " {% static 'js/jquery.bootstrap.mo...