I have installed Django 1.11 and django-bootstrap3 in version 8.2.3 by pip. I'm making a simple application that carries a form. Reviewing the online documentation I saw that the configuration of Bootstrap 3 must be added in the settings.py as follows:
BOOTSTRAP3 = {
'jquery_url': '//code.jquery.com/jquery.min.js',
'base_url': '//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/',
'css_url': None,
'theme_url': None,
'javascript_url': None,
'javascript_in_head': False,
'include_jquery': False,
'horizontal_label_class': 'col-md-3',
'horizontal_field_class': 'col-md-9',
'set_required': True,
'set_disabled': False,
'set_placeholder': True,
'required_css_class': '',
'error_css_class': 'has-error',
'success_css_class': 'has-success',
'formset_renderers':{
'default': 'bootstrap3.renderers.FormsetRenderer',
},
'form_renderers': {
'default': 'bootstrap3.renderers.FormRenderer',
},
'field_renderers': {
'default': 'bootstrap3.renderers.FieldRenderer',
'inline': 'bootstrap3.renderers.InlineFieldRenderer',
},
}
But when I work offline, my application does not load CSS or JavaScript because my configuration is pointing to this site:
'base_url': '//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/',
I have the Bootstrap installed on this route of my computer:
/home/pavel/.virtualenvs/pavel/lib/python3.5/site-packages/bootstrap3
As you can see I am using a virtual environment.
My question is: How do I configure the settings.py
to have my application load the local bootstrap3 instead of loading it from the Internet?
Thanks in advance.