]> git.parisson.com Git - telemeta.git/commitdiff
go to 0.7, add Riccardo to authors, fix deleted element in playlist
authoryomguy <yomguy@parisson.com>
Sun, 10 Apr 2011 21:39:50 +0000 (23:39 +0200)
committeryomguy <yomguy@parisson.com>
Sun, 10 Apr 2011 21:39:50 +0000 (23:39 +0200)
telemeta/__init__.py
telemeta/templates/telemeta_default/home.html
telemeta/web/base.py

index 24fa2059cdd9dcb3fa3efbd5a9ef214eac305940..7b7acd78f794ea0190dca375c425530dc15b75d2 100644 (file)
@@ -8,17 +8,18 @@ U{http://telemeta.org}
 @author: Guillaume Pellerin <pellerin@parisson.com>
 @author: Olivier Guilyardi <olivier@samalyse.com>
 @author: David Lipszyc <davidlipszyc@gmail.com>
+@author: Riccardo Zaccarelli <riccardo.zaccarelli@gmail.com>
 """
 
 __docformat__ = 'epytext en'
-__version__ = '0.6.0'
+__version__ = '0.7.0'
 __url__ = 'http://telemeta.org'
-__copyright__ = '(C) 2007-2010 Parisson SARL and Samalyse SARL'
+__copyright__ = '(C) 2007-2011 Parisson'
 __license__ = 'CeCILL-2'
 __license_long__ = """
-Copyright Parisson SARL (2010)
+Copyright Parisson SARL (2007-2011)
 
-<guillaume.<pellerin@parisson.com>
+<yomguy@parisson.com>
 <olivier@samalyse.com>
 
 This software is a computer program whose purpose is to backup, analyse, 
index 16d7d165dea85037d8ee392c851068856a757c80..1efd9c7cb18d1d6f180c7e7eb2d2d3d253a80c1b 100644 (file)
         {% for resource in playlist.resources %}
         <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
             <td>
-            {% if resource.type == "item" %}
+            {% if resource.type == "item" and not resource.element == None %}
              <a href="{% url telemeta-item-detail resource.element.public_id %}">{{ resource.element }}</a>
             {% endif %}
-            {% if resource.type == "collection" %}
+            {% if resource.type == "collection" and not resource.element == None %}
              <a href="{% url telemeta-collection-detail resource.element.public_id %}">{{ resource.element }}</a>
             {% endif %}
-            {% if resource.type == "marker" %}
+            {% if resource.type == "marker" and not resource.element == None  %}
              <a href="{% url telemeta-item-detail-marker resource.element.public_id %}">{{ resource.element }}</a>
             {% endif %}
+            {% if resource.element == None %}<b>deleted</b>{% endif %}
             </td>
             <td>{{ resource.type }}</td>
             <td>
index 8275bafbf07903b049b7d408d0d872640c98eae6..4db69776f813a9aea1f858fa2e2582521f9ac602 100644 (file)
@@ -958,12 +958,15 @@ class WebView(object):
                 playlist_resources = PlaylistResource.objects.filter(playlist=playlist)
                 resources = []
                 for resource in playlist_resources:
-                    if resource.resource_type == 'item':
-                        element = MediaItem.objects.get(public_id=resource.resource_id)
-                    if resource.resource_type == 'collection':
-                        element = MediaCollection.objects.get(public_id=resource.resource_id)
-                    if resource.resource_type == 'marker':
-                        element = MediaItemMarker.objects.get(public_id=resource.resource_id)
+                    try:
+                        if resource.resource_type == 'item':
+                            element = MediaItem.objects.get(public_id=resource.resource_id)
+                        if resource.resource_type == 'collection':
+                            element = MediaCollection.objects.get(public_id=resource.resource_id)
+                        if resource.resource_type == 'marker':
+                            element = MediaItemMarker.objects.get(public_id=resource.resource_id)
+                    except:
+                        element = None
                     resources.append({'element': element, 'type': resource.resource_type, 'public_id': resource.public_id })
                 playlists.append({'playlist': playlist, 'resources': resources})
         return playlists