@@ -6,25 +6,54 @@ The django-bootstrap3 has some pre-configured settings.
6
6
7
7
They can be modified by adding a dict variable called ``BOOTSTRAP3 `` in your ``settings.py `` and customizing the values you want;
8
8
9
- The ``BOOTSTRAP3 `` dict variable is configured by default to the following values :
9
+ The ``BOOTSTRAP3 `` dict variable is contains these settings and defaults :
10
10
11
11
12
12
.. code :: django
13
13
14
14
# Default settings
15
15
BOOTSTRAP3 = {
16
+
17
+ # The URL to the jQuery JavaScript file
16
18
'jquery_url': '//code.jquery.com/jquery.min.js',
19
+
20
+ # The Bootstrap base URL
17
21
'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)
18
24
'css_url': None,
25
+
26
+ # The complete URL to the Bootstrap CSS file (None means no theme)
19
27
'theme_url': None,
28
+
29
+ # The complete URL to the Bootstrap JavaScript file (None means derive it from base_url)
20
30
'javascript_url': None,
31
+
32
+ # Put JavaScript in the HEAD section of the HTML document (only relevant if you use bootstrap3.html)
21
33
'javascript_in_head': False,
34
+
35
+ # Include jQuery with Bootstrap JavaScript (affects django-bootstrap3 template tags)
22
36
'include_jquery': False,
37
+
38
+ # Label class to use in horizontal forms
23
39
'horizontal_label_class': 'col-md-2',
40
+
41
+ # Field class to use in horiozntal forms
24
42
'horizontal_field_class': 'col-md-4',
43
+
44
+ # Set HTML required attribute on required fields
25
45
'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)
26
51
'form_required_class': '',
52
+
53
+ # Class to indicate error (better to set this in your Django form)
27
54
'form_error_class': '',
55
+
56
+ # Renderers (only set these if you have studied the source and understand the inner workings)
28
57
'formset_renderers':{
29
58
'default': 'bootstrap3.renderers.FormsetRenderer',
30
59
},
0 commit comments