comparison gpp/templates/polls/poll_results.html @ 6:b6263ac72052

Use DRY principle to manage third party javascript libraries. Created script_tags template tags to generate the correct link and script tags for 3rd party libraries. The settings.py file is the only place where the full path name is specified.
author Brian Neal <bgneal@gmail.com>
date Sat, 11 Apr 2009 22:50:56 +0000
parents dbd703f7d63a
children f408971657b9
comparison
equal deleted inserted replaced
5:63696b279e35 6:b6263ac72052
1 {% extends 'base.html' %} 1 {% extends 'base.html' %}
2 {% load comment_tags %} 2 {% load comment_tags %}
3 {% load script_tags %}
3 {% block title %}Poll Results: {{ poll.question }}{% endblock %} 4 {% block title %}Poll Results: {{ poll.question }}{% endblock %}
4 {% block custom_css %} 5 {% block custom_css %}
5 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/polls.css" /> 6 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/polls.css" />
6 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/comments.css" /> 7 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/comments.css" />
7 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}js/markitup/skins/markitup/style.css" />
8 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}js/markitup/sets/markdown/style.css" />
9 {% endblock %} 8 {% endblock %}
10 {% block custom_js %} 9 {% block custom_js %}
11 <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.2.6.min.js"></script> 10 {% if poll.is_open %}
11 {% script_tags "jquery" %}
12 {% script_tags "markitup" %}
12 <script type="text/javascript" src="{{ MEDIA_URL }}js/comments.js"></script> 13 <script type="text/javascript" src="{{ MEDIA_URL }}js/comments.js"></script>
13 <script type="text/javascript" src="{{ MEDIA_URL }}js/markitup/jquery.markitup.pack.js"></script> 14 {% endif %}
14 <script type="text/javascript" src="{{ MEDIA_URL }}js/markitup/sets/markdown/set.js"></script>
15 {% endblock %} 15 {% endblock %}
16 {% block content %} 16 {% block content %}
17 <h2>Polls</h2> 17 <h2>Polls</h2>
18 <h3>{{ poll.question }}</h3> 18 <h3>{{ poll.question }}</h3>
19 <dl class="poll-result"> 19 <dl class="poll-result">