comparison gpp/templates/shoutbox/view.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 avatar_tags %} 2 {% load avatar_tags %}
3 {% load smiley_tags %} 3 {% load smiley_tags %}
4 {% load script_tags %}
4 {% block custom_css %} 5 {% block custom_css %}
5 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/shoutbox_app.css" /> 6 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/shoutbox_app.css" />
6 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/pagination.css" /> 7 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/pagination.css" />
7 {% endblock %} 8 {% endblock %}
8 {% block custom_js %} 9 {% block custom_js %}
9 <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.2.6.min.js"></script> 10 {% script_tags "jquery" %}
10 <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.jeditable.mini.js"></script> 11 {% script_tags "jquery-jeditable" %}
11 <script type="text/javascript" src="{{ MEDIA_URL }}js/shoutbox_app.js"></script> 12 <script type="text/javascript" src="{{ MEDIA_URL }}js/shoutbox_app.js"></script>
12 {% endblock %} 13 {% endblock %}
13 {% block title %}Shout History{% endblock %} 14 {% block title %}Shout History{% endblock %}
14 {% block content %} 15 {% block content %}
15 <h2>Shout History</h2> 16 <h2>Shout History</h2>