Skip to content

Commit 1baa142

Browse files
committed
Improved documentation of settings
1 parent cc69392 commit 1baa142

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

docs/settings.rst

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,54 @@ The django-bootstrap3 has some pre-configured settings.
66

77
They can be modified by adding a dict variable called ``BOOTSTRAP3`` in your ``settings.py`` and customizing the values ​​you want;
88

9-
The ``BOOTSTRAP3`` dict variable is configured by default to the following values​​:
9+
The ``BOOTSTRAP3`` dict variable is contains these settings and defaults:
1010

1111

1212
.. code:: django
1313
1414
# Default settings
15-
BOOTSTRAP3_DEFAULTS = {
15+
BOOTSTRAP3 = {
16+
17+
# The URL to the jQuery JavaScript file
1618
'jquery_url': '//code.jquery.com/jquery.min.js',
19+
20+
# The Bootstrap base URL
1721
'base_url': '//netdna.bootstrapcdn.com/bootstrap/3.2.0/',
22+
23+
# The complete URL to the Bootstrap CSS file (None means derive it from base_url)
1824
'css_url': None,
25+
26+
# The complete URL to the Bootstrap CSS file (None means no theme)
1927
'theme_url': None,
28+
29+
# The complete URL to the Bootstrap JavaScript file (None means derive it from base_url)
2030
'javascript_url': None,
31+
32+
# Put JavaScript in the HEAD section of the HTML document (only relevant if you use bootstrap3.html)
2133
'javascript_in_head': False,
34+
35+
# Include jQuery with Bootstrap JavaScript (affects django-bootstrap3 template tags)
2236
'include_jquery': False,
37+
38+
# Label class to use in horizontal forms
2339
'horizontal_label_class': 'col-md-2',
40+
41+
# Field class to use in horiozntal forms
2442
'horizontal_field_class': 'col-md-4',
43+
44+
# Set HTML required attribute on required fields
2545
'set_required': True,
46+
47+
# Set placeholder attributes to label if no placeholder is provided
48+
'set_placeholder': True,
49+
50+
# Class to indicate required (better to set this in your Django form)
2651
'form_required_class': '',
52+
53+
# Class to indicate error (better to set this in your Django form)
2754
'form_error_class': '',
55+
56+
# Renderers (only set these if you have studied the source and understand the inner workings)
2857
'formset_renderers':{
2958
'default': 'bootstrap3.renderers.FormsetRenderer',
3059
},

0 commit comments

Comments
 (0)