Skip to content

Commit

Permalink
Add this wunderbar snippet of code demonstrating an astounding abilit…
Browse files Browse the repository at this point in the history
…y of Django templating system.
  • Loading branch information
mpasternak committed Oct 23, 2014
1 parent da5b83d commit bbafe9f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test_project/test_app/templates/multiseek/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

{# I'm unsure how to parametryze this for LANGUAGE_CODE with default #}
{# Django templating engine, in Jinja2 I'd use {% set ... %} #}
<script src="{% static 'jquery.ui.datepicker-pl/index.js' %}"></script>
<script src="{% static '' %}"></script>

{% if request.GET.foundation == "1" %}
<script src="{% static 'foundation/js/vendor/modernizr.js' %}"></script>
Expand Down Expand Up @@ -42,5 +42,10 @@
$(document).foundation();
</script>
{% endif %}

{% with 'jquery.ui.datepicker-'|add:LANGUAGE_CODE|add:'/index.js' as datepicker_url %}
<script src="{% static datepicker_url %}" type="text/javascript"></script>
{% endwith %}

</body>
</html>

0 comments on commit bbafe9f

Please sign in to comment.