view bns_website/templates/bands/band_list.html @ 41:9ce9f77d6cde

I added a get_absolute_url() to the news model so I can use that in the news template tag to create a link to the correct anchor on the news list page. The link works, but for some reason it goes to the beginning of the article content and not to the title. I've played around with the article tag and making an aside tag with an id and for whatever reason it always goes to the article content.
author Bob Mourlam <bob.mourlam@gmail.com>
date Sun, 06 Nov 2011 22:13:27 -0600
parents f2cb9b2ec552
children 59dd574fcfff
line wrap: on
line source
{% extends 'base.html' %}
{% load core_tags %}
{% block title %}Bands{% endblock %}

{% block custom_css %}
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/redmond/jquery-ui.css">
{% endblock %}
{% block custom_js %}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<script type="text/javascript">
	$(function() {
      $("#accordion").accordion({active: false});
	});
</script>
{% endblock %}

{% block content %}
{% navbar 'bands' %}
<h1>Bands</h1>
<p>This is too &quot;wall of text-y&quot;, so maybe break it up with band photos. And/or put a javascript slideshow of all the bands up here at the top.</p>
<dl>
{% for band in object_list %}
<dt><a href="{{ band.url }}">{{ band.name }}</a></dt>
<dd>{{ band.notes|linebreaksbr }}</dd>
{% endfor %}
</dl>

<p>And here is what it looks like as a jQuery accordion.</p>
<div id="accordion">
{% for band in object_list %}
<h3><a href="#">{{ band.name }}</a></h3>
<div>
   {{ band.notes|linebreaksbr }}
   <p style="margin-top:1em"><a class="btn default" href="{{ band.url }}">{{ band.name }} Website</a></p>
</div>
{% endfor %}
</div>

{% endblock %}