diff --git a/dal/dal/settings.py b/dal/dal/settings.py index fceeb2d..3e25ba8 100644 --- a/dal/dal/settings.py +++ b/dal/dal/settings.py @@ -89,6 +89,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'bootstrap3', 'sekizai', 'dal', ] @@ -133,6 +134,75 @@ TEMPLATES = [ WSGI_APPLICATION = 'dal.wsgi.application' +# Django Bootstrap - Settings +# Added Configuration for bootstrap static files to load over https. +BOOTSTRAP3 = { + + # The URL to the jQuery JavaScript file + 'jquery_url': '//code.jquery.com/jquery.min.js', + + # The Bootstrap base URL + 'base_url': '//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/', + + # The complete URL to the Bootstrap CSS file + # (None means derive it from base_url) + 'css_url': None, + + # The complete URL to the Bootstrap CSS file (None means no theme) + 'theme_url': None, + + # The complete URL to the Bootstrap JavaScript file + # (None means derive it from base_url) + 'javascript_url': None, + + # Put JavaScript in the HEAD section of the HTML document + # (only relevant if you use bootstrap3.html) + 'javascript_in_head': False, + + # Include jQuery with Bootstrap JavaScript + # (affects django-bootstrap3 template tags) + 'include_jquery': False, + + # Label class to use in horizontal forms + 'horizontal_label_class': 'col-md-3', + + # Field class to use in horizontal forms + 'horizontal_field_class': 'col-md-9', + + # Set HTML required attribute on required fields + 'set_required': True, + + # Set HTML disabled attribute on disabled fields + 'set_disabled': False, + + # Set placeholder attributes to label if no placeholder is provided + 'set_placeholder': True, + + # Class to indicate required (better to set this in your Django form) + 'required_css_class': '', + + # Class to indicate error (better to set this in your Django form) + 'error_css_class': 'has-error', + + # Class to indicate success, meaning the field has valid input + # (better to set this in your Django form) + 'success_css_class': 'has-success', + + # Renderers (only set these if you have studied the source and understand + # the inner workings) + 'formset_renderers': { + 'default': 'bootstrap3.renderers.FormsetRenderer', + }, + 'form_renderers': { + 'default': 'bootstrap3.renderers.FormRenderer', + }, + 'field_renderers': { + 'default': 'bootstrap3.renderers.FieldRenderer', + 'inline': 'bootstrap3.renderers.InlineFieldRenderer', + }, +} + + # Database # https://docs.djangoproject.com/en/1.10/ref/settings/#databases diff --git a/dal/dal/templates/base_short.html b/dal/dal/templates/base_short.html index 699bdf7..064217d 100644 --- a/dal/dal/templates/base_short.html +++ b/dal/dal/templates/base_short.html @@ -30,7 +30,7 @@ {% endblock css_extra %} {% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %} - + {% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %} @@ -99,8 +99,8 @@ {% endcomment %} {% endblock js_extra %} - + + diff --git a/dal/dal/templates/landing.html b/dal/dal/templates/landing.html index cc836e2..3556054 100644 --- a/dal/dal/templates/landing.html +++ b/dal/dal/templates/landing.html @@ -1,5 +1,5 @@ {% extends "base_short.html" %} -{% load staticfiles %} +{% load staticfiles bootstrap3 %} {% block content %} @@ -15,7 +15,7 @@ a:link { color: #000000 }
-

Login

+

Login

{% include 'includes/_messages.html' %}
{% csrf_token %}