@@ -54,42 +54,10 @@ Add ``bootstrap_datepicker_plus`` to the list of ``INSTALLED_APPS`` in your ``se
5454 ' bootstrap_datepicker_plus' ,
5555 ]
5656
57- ``jQuery `` is needed for ``datepicker `` to render, make sure you have jQuery in your template,
58- or you can use ``jQuery `` included with ``Bootstrap `` by setting ``include_jquery `` option to ``True ``
59- in your ``settings.py `` file.
60- If you don't have ``BOOTSTRAP3 ``/``BOOTSTRAP4 `` settings block you have to create one.
61-
62- .. code :: python
63-
64- # Use BOOTSTRAP3 if you are using Bootstrap 3
65- BOOTSTRAP4 = {
66- ' include_jquery' : True ,
67- }
68-
69- Make sure you have bootstrap tags in your template along with ``forms.media `` tag,
70- it adds all JS and CSS resources needed to render the date-picker.
71-
72- .. code :: html
73-
74- {% load bootstrap4 %} {# import bootstrap4/bootstrap3 #}
75- {% bootstrap_css %} {# Embed Bootstrap CSS #}
76- {% bootstrap_javascript jquery='full' %} {# Embed Bootstrap JS+jQuery #}
77- {{ form.media }} {# Adds date-picker required JS and CSS #}
78-
79- The ``form.media `` tag is only for Generic Views. If you are generating the view yourself
80- and passing the form to ``render `` function, you have to use ``<your-form-variable>.media ``.
81- For Example, in case of the following example you have to use ``{{ my_form.media }} ``
82- instead of ``{{ form.media }} ``.
83-
84- .. code :: python
85-
86- # File: views.py
87- from django.shortcuts import render
88- from .forms import UserForm
89-
90- def create_user (request ):
91- user_form = UserForm()
92- return render(request, ' my_template.html' , {' my_form' : user_form})
57+ This installation instruction assumes you have ``jQuery `` and Bootstrap JS/CSS files present in your template
58+ and you are using ``form.media `` in your django template. If not you should checkout our
59+ `configuration instructions <https://monim67.github.io/django-bootstrap-datepicker-plus/configure/ >`__
60+ which covers almost everything you need to get the widget running.
9361
9462
9563
0 commit comments