Commits

Steve Losh committed 791bcfd

Updated the templates to use get_absolute_url where possible.

  • Participants
  • Parent commits 988a556

Comments (0)

Files changed (3)

File templates/djschedule/index.html

 {% endblock %}
 
 {% block scripts %}
-	<script type="text/javascript"
-	 		src="/site-media/scripts/djschedule.js"></script>
+    <script type="text/javascript"
+            src="/site-media/scripts/djschedule.js"></script>
 {% endblock %}
 
 {% block content %}
 <h1>Upcoming Schedule</h1>
 <form id="djschedule_signup_form" action="">
-	{% for date, slot, plural in next_slots %}
-	<div class="djschedule_slot">
-		<input class="djschedule_slot" type="radio" name="date"
-			   value="{{ date }}" {% if slot %}disabled="disabled" {% else %}{% ifequal slot.name "CANCELED" %}disabled="disabled" {% endifequal %}{% endif %}/>
-		On {{ date|date:"F d" }}
-		{% if slot %}
-		{% ifequal slot.name "CANCELED" %}
-			Lindy Jam is <b>CANCELED</b>.
-		{% else %}
-			<b>{{ slot.name }}</b>
-			{% if plural %}are{% else %}is{% endif %}
-			going to DJ.
-		{% endifequal %}
-		{% else %}
-		there isn't any one signed up!
-		{% endif %}
-	</div>
-	{% endfor %}
+    {% for date, slot, plural in next_slots %}
+    <div class="djschedule_slot">
+        <input class="djschedule_slot" type="radio" name="date"
+               value="{{ date }}" 
+               {% if slot %}
+                   disabled="disabled" 
+               {% else %}
+                   {% ifequal slot.name "CANCELED" %}
+                       disabled="disabled"
+                   {% endifequal %}
+               {% endif %} />
+        On {{ date|date:"F d" }}
+        {% if slot %}
+        {% ifequal slot.name "CANCELED" %}
+            Lindy Jam is <b>CANCELED</b>.
+        {% else %}
+            <b>{{ slot.name }}</b>
+            {% if plural %}are{% else %}is{% endif %}
+            going to DJ.
+        {% endifequal %}
+        {% else %}
+        there isn't any one signed up!
+        {% endif %}
+    </div>
+    {% endfor %}
 
-	<h2>Want to DJ?</h2>
-	<p>Great! Pick a free day and fill in your name.  If you want us to email you a reminder on the day of, fill in your email address too.</p>  
-	<p>We can also send you a text message as a reminder if you put in your phone number and phone company.</p>
-	<div id="djschedule_signup">
-		<input id="djschedule_name" class="input_text with-instructions"
-		 	   name="name" type="text" 
-			   title="Who are you?" />
-		<input id="djschedule_email" class="input_text with-instructions"
-			   name="email" type="text" 
-			   title="Want an email reminder?  Put your email address here." />
-		<input id="djschedule_phone" class="input_text with-instructions"
-			   name="phone" type="text" 
-			   title="Want an SMS reminder?  Put your phone number here." />
-		<select id="djschedule_carrier" class="input_select" 
-			    name="carrier">
-			{% for carrier in carriers %}
-				<option class="djschedule_carrier_option" 
-						value="{{ carrier }}">{{ carrier }}</option>
-			{% endfor %}
-		</select>
-		<input id="djschedule_submit" class="input_submit"
-		 	   name="submit" type="submit" value="Sign Up" />
-	</div>
+    <h2>Want to DJ?</h2>
+    <p>Great! Pick a free day and fill in your name.  If you want us to email you a reminder on the day of, fill in your email address too.</p>  
+    <p>We can also send you a text message as a reminder if you put in your phone number and phone company.</p>
+    <div id="djschedule_signup">
+        <input id="djschedule_name" class="input_text with-instructions"
+               name="name" type="text" 
+               title="Who are you?" />
+        <input id="djschedule_email" class="input_text with-instructions"
+               name="email" type="text" 
+               title="Want an email reminder?  Put your email address here." />
+        <input id="djschedule_phone" class="input_text with-instructions"
+               name="phone" type="text" 
+               title="Want an SMS reminder?  Put your phone number here." />
+        <select id="djschedule_carrier" class="input_select" 
+                name="carrier">
+            {% for carrier in carriers %}
+                <option class="djschedule_carrier_option" 
+                        value="{{ carrier }}">{{ carrier }}</option>
+            {% endfor %}
+        </select>
+        <input id="djschedule_submit" class="input_submit"
+               name="submit" type="submit" value="Sign Up" />
+    </div>
 </form>
 {% endblock %}

File templates/playlists/index.html

 
 {% block style %}
 <link rel="stylesheet" type="text/css" 
-	  href="/site-media/styles/playlistsstyle.css"/>
+      href="/site-media/styles/playlistsstyle.css"/>
 {% endblock %}
 
 {% block scripts %}
-	<script type="text/javascript"
-	 		src="/site-media/scripts/playlists.js"></script>
+    <script type="text/javascript"
+            src="/site-media/scripts/playlists.js"></script>
 {% endblock %}
 
 {% block content %}
 <h1>Playlists</h1>
-	<p>Here's where you can check out what the Rochester DJs have been playing.</p>
-	<ul id="playlists_list">
-	{% for playlist, ends in playlists %}
-		{% url lindyjam.playlists.views.single_playlist playlist.date.year, playlist.date.month, playlist.date.day, playlist.name as pl %}
-		<li>
-			<a href="{{ pl }}">{{ playlist.name }}'{% if not ends %}s{% endif %} set on {{ playlist.date|date:"F j, Y" }}</a>
-		</li>
-	{% endfor %}
-	</ul>
+    <p>Here's where you can check out what the Rochester DJs have been playing.</p>
+    <ul id="playlists_list">
+    {% for playlist, ends in playlists %}
+        <li>
+            <a href="{{ playlist.get_absolute_url }}">
+                {{ playlist.name }}'{% if not ends %}s{% endif %} 
+                set on {{ playlist.date|date:"F j, Y" }}
+            </a>
+        </li>
+    {% endfor %}
+    </ul>
 {% endblock %}

File templates/playlists/single_playlist.html

 
 {% block style %}
 <link rel="stylesheet" type="text/css" 
-	  href="/site-media/styles/playlistsstyle.css"/>
+      href="/site-media/styles/playlistsstyle.css"/>
 {% endblock %}
 
 {% block scripts %}
-	<script type="text/javascript"
-	 		src="/site-media/scripts/playlists.js"></script>
+    <script type="text/javascript"
+            src="/site-media/scripts/playlists.js"></script>
 {% endblock %}
 
 {% block content %}
-<h1>{{ playlist.name }}'{% if not ends %}s{% endif %} set on {{ playlist.date|date:"F j, Y" }}</h1>
-	<table id="playlists_playlist_table">
-		<tr class="playlists_playlist_table_header">
-			<th>#</th>
-			<th>Title</th>
-			<th>Artist</th>
-			<th>Album</th>
-			<th>BPM</th>
-		</tr>
-	{% for track in playlist.playlisttrack_set.all %}
-		<tr class="playlists_playlist_table_entry">
-			<td class="playlists_track_num">{{ track.number }}</td>
-			<td>{{ track.song.title }}</td>
-			<td>{{ track.song.artist }}</td>
-			<td>{{ track.song.album }}</td>
-			<td>{% if track.song.bpm %}{{ track.song.bpm }}{% endif %}</td>
-		</tr>
-	{% endfor %}
-	</table>
+    <h1>
+        {{ playlist.name }}'{% if not ends %}s{% endif %}
+        set on {{ playlist.date|date:"F j, Y" }}
+    </h1>
+    <table id="playlists_playlist_table">
+        <tr class="playlists_playlist_table_header">
+            <th>#</th>
+            <th>Title</th>
+            <th>Artist</th>
+            <th>Album</th>
+            <th>BPM</th>
+        </tr>
+    {% for track in playlist.playlisttrack_set.all %}
+        <tr class="playlists_playlist_table_entry">
+            <td class="playlists_track_num">{{ track.number }}</td>
+            <td>{{ track.song.title }}</td>
+            <td>{{ track.song.artist }}</td>
+            <td>{{ track.song.album }}</td>
+            <td>{% if track.song.bpm %}{{ track.song.bpm }}{% endif %}</td>
+        </tr>
+    {% endfor %}
+    </table>
 {% endblock %}