Skip to content

Commit 1de65bc

Browse files
committed
README update: vuepress built installation instructions added [ci skip]
1 parent cb39401 commit 1de65bc

File tree

2 files changed

+8
-72
lines changed

2 files changed

+8
-72
lines changed

README.rst

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -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

docs/Getting_Started.rst

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -27,39 +27,7 @@ Add ``bootstrap_datepicker_plus`` to the list of ``INSTALLED_APPS`` in your ``se
2727
'bootstrap_datepicker_plus',
2828
]
2929
30-
``jQuery`` is needed for ``datepicker`` to render, make sure you have jQuery in your template,
31-
or you can use ``jQuery`` included with ``Bootstrap`` by setting ``include_jquery`` option to ``True``
32-
in your ``settings.py`` file.
33-
If you don't have ``BOOTSTRAP3``/``BOOTSTRAP4`` settings block you have to create one.
34-
35-
.. code:: python
36-
37-
# Use BOOTSTRAP3 if you are using Bootstrap 3
38-
BOOTSTRAP4 = {
39-
'include_jquery': True,
40-
}
41-
42-
Make sure you have bootstrap tags in your template along with ``forms.media`` tag,
43-
it adds all JS and CSS resources needed to render the date-picker.
44-
45-
.. code:: html
46-
47-
{% load bootstrap4 %} {# import bootstrap4/bootstrap3 #}
48-
{% bootstrap_css %} {# Embed Bootstrap CSS #}
49-
{% bootstrap_javascript jquery='full' %} {# Embed Bootstrap JS+jQuery #}
50-
{{ form.media }} {# Adds date-picker required JS and CSS #}
51-
52-
The ``form.media`` tag is only for Generic Views. If you are generating the view yourself
53-
and passing the form to ``render`` function, you have to use ``<your-form-variable>.media``.
54-
For Example, in case of the following example you have to use ``{{ my_form.media }}``
55-
instead of ``{{ form.media }}``.
56-
57-
.. code:: python
58-
59-
# File: views.py
60-
from django.shortcuts import render
61-
from .forms import UserForm
62-
63-
def create_user(request):
64-
user_form = UserForm()
65-
return render(request, 'my_template.html', {'my_form': user_form})
30+
This installation instruction assumes you have ``jQuery`` and Bootstrap JS/CSS files present in your template
31+
and you are using ``form.media`` in your django template. If not you should checkout our
32+
`configuration instructions <https://monim67.github.io/django-bootstrap-datepicker-plus/configure/>`__
33+
which covers almost everything you need to get the widget running.

0 commit comments

Comments
 (0)