Browse Source

Add django-bower and datepicker in comissao_form

pull/6/head
Eduardo Edson Batista Cordeiro Alves 10 years ago
parent
commit
4d6aa8124f
  1. 3
      .gitignore
  2. 19
      sapl/settings.py
  3. 6
      templates/base.html
  4. 13
      templates/comissoes/comissao_form.html

3
.gitignore

@ -72,3 +72,6 @@ target/
.vagrant
static
components
bower_components

19
sapl/settings.py

@ -58,6 +58,9 @@ INSTALLED_APPS = (
# zurb foundation
'foundation',
'crispy_forms_foundation',
# bower
'djangobower',
)
MIDDLEWARE_CLASSES = (
@ -131,3 +134,19 @@ DAB_FIELD_RENDERER = \
CRISPY_TEMPLATE_PACK = 'foundation-5'
CRISPY_FAIL_SILENTLY = not DEBUG
BOWER_COMPONENTS_ROOT = os.path.join(BASE_DIR, "bower_components")
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'djangobower.finders.BowerFinder',
)
BOWER_INSTALLED_APPS = (
'jquery#1.9',
'underscore',
'foundation-datepicker',
'components-font-awesome',
'foundation-icon-fonts',
)

6
templates/base.html

@ -7,12 +7,16 @@
<meta charset="utf-8">
<title>{% block head_title %}{% trans 'SAPL - Sistema de Apoio ao Processo Legislativo' %}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block head_content %}
{% block header_content %}
<link rel="stylesheet" href="{% static 'foundation/css/foundation.min.css' %}">
<link rel="stylesheet" href="{% static 'foundation-datepicker/css/foundation-datepicker.min.css' %}">
<link rel="stylesheet" href="{% static 'components-font-awesome/css/font-awesome.css' %}">
<link rel="stylesheet" href="{% static 'foundation-icon-fonts/font-awesome.css' %}">
<script type="text/javascript" src="{% static 'foundation/js/vendor/modernizr.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/vendor/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/vendor/fastclick.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/foundation.min.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation-datepicker/js/foundation-datepicker.min.js' %}"></script>
{% endblock %}
</head>

13
templates/comissoes/comissao_form.html

@ -5,3 +5,16 @@
{% crispy form %}
{% endblock %}
{% block foot_js %}
<script type="text/javascript">
$(function () {
$('.dateinput').fdatepicker({
// TODO localize
format: 'dd/mm/yyyy',
language: 'pt',
endDate: '31/12/2100',
todayBtn: true
});
});
</script>
{% endblock %}
Loading…
Cancel
Save