[Debconf-video-commits] r416 - package/branches/pycon09/src/pyconvideo/pyconvideo

benh at alioth.debian.org benh at alioth.debian.org
Sun Mar 29 19:17:16 UTC 2009


Author: benh
Date: 2009-03-29 19:17:16 +0000 (Sun, 29 Mar 2009)
New Revision: 416

Modified:
   package/branches/pycon09/src/pyconvideo/pyconvideo/videotargetfile_list.html
   package/branches/pycon09/src/pyconvideo/pyconvideo/views.py
Log:
Fix up target list.


Modified: package/branches/pycon09/src/pyconvideo/pyconvideo/videotargetfile_list.html
===================================================================
--- package/branches/pycon09/src/pyconvideo/pyconvideo/videotargetfile_list.html	2009-03-29 18:12:28 UTC (rev 415)
+++ package/branches/pycon09/src/pyconvideo/pyconvideo/videotargetfile_list.html	2009-03-29 19:17:16 UTC (rev 416)
@@ -25,7 +25,7 @@
      <thead>
       <tr>
 	<th>Event</th>
-	<th>Recording</th>
+	<th>Recordings</th>
 	{% for format in formats %}
 	<th>Target '{{ format.target_format_abbr }}'</th>
 	{% endfor %}
@@ -34,11 +34,18 @@
      </tbody>
       {% for file_set in files %}
       <tr>
-	<td>{{ file_set.source.event.title }}</td>
-	<td>{{ file_set.source.recording.recording_filename }}</td>
+	<td>{{ file_set.event.title }}</td>
+	<td>
+	  {% for recording in file_set.recording %}
+	  <span class="status-{{ recording.file_status.file_status_code }}">
+	    {{ recording.recording_filename }}
+	  </span>
+	  <br />
+	  {% endfor %}
+	</td>
 	{% for target in file_set.target %}
 	{% if target %}
-	<td class="status-{{ target.status.status_code }}">
+	<td class="status-{{ target.file_status.file_status_code }}">
 	  {% if target.locked_by %}
 	  {% ifequal target.locked_by user %}
 	  <form action="/target/{{ target.id }}/review" method="post">

Modified: package/branches/pycon09/src/pyconvideo/pyconvideo/views.py
===================================================================
--- package/branches/pycon09/src/pyconvideo/pyconvideo/views.py	2009-03-29 18:12:28 UTC (rev 415)
+++ package/branches/pycon09/src/pyconvideo/pyconvideo/views.py	2009-03-29 19:17:16 UTC (rev 416)
@@ -201,13 +201,15 @@
                                'events': events})
 
 def list_targets(request):
-    sources = models.VideoEvent.objects.all().select_related()
+    events = models.VideoEvent.objects.all().select_related()
     formats = models.VideoTargetFormat.objects.all()
     files = []
-    for source in sources:
-        files.append({'source': source, 'target': []})
+    for event in events:
+        files.append({'event': event.event,
+                      'recording': list(event.recording_set.all()),
+                      'target': []})
         for format in formats:
-            for target in source.target_set.all():
+            for target in event.target_set.all():
                 if target.target_format == format:
                     break
             else:




More information about the Debconf-video-commits mailing list