[Debconf-video-commits] r356 - package/branches/pycon09/src/debconfvideo/web/pyconvideo

benh at alioth.debian.org benh at alioth.debian.org
Sat Mar 21 16:18:51 UTC 2009


Author: benh
Date: 2009-03-21 16:18:51 +0000 (Sat, 21 Mar 2009)
New Revision: 356

Modified:
   package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py
Log:
Add a target_filename property to VideoTargetFile as well as making it the default representation.


Modified: package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py
===================================================================
--- package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py	2009-03-21 16:17:56 UTC (rev 355)
+++ package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py	2009-03-21 16:18:51 UTC (rev 356)
@@ -122,8 +122,11 @@
     locked_by = models.ForeignKey(auth.models.User, db_column='locked_by', null=True)
     generated_time = models.DateTimeField()
     published_time = models.DateTimeField()
-    def __unicode__(self):
+    def _target_filename(self):
         return debconfvideo.target_filename(self.event_recording,
                                             self.target_format)
+    target_filename = property(_target_filename)
+    def __unicode__(self):
+        return self.target_filename
     class Meta:
         db_table = u'video_target_file'




More information about the Debconf-video-commits mailing list