[Debconf-video-commits] r350 - package/branches/pycon09/src/debconfvideo/web/pyconvideo
benh at alioth.debian.org
benh at alioth.debian.org
Sat Mar 21 04:06:55 UTC 2009
Author: benh
Date: 2009-03-21 04:06:55 +0000 (Sat, 21 Mar 2009)
New Revision: 350
Modified:
package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py
Log:
Define useful default representations.
Modified: package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py
===================================================================
--- package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py 2009-03-21 03:59:12 UTC (rev 349)
+++ package/branches/pycon09/src/debconfvideo/web/pyconvideo/models.py 2009-03-21 04:06:55 UTC (rev 350)
@@ -26,6 +26,8 @@
title = models.CharField(unique=True, max_length=200)
homepage = models.CharField(max_length=100)
timezone = models.CharField(max_length=50)
+ def __unicode__(self):
+ return self.title
class Meta:
db_table = u'conference'
@@ -33,6 +35,8 @@
conference = models.ForeignKey(Conference)
# Not really the primary key, but this will only be used for one conference
conference_room = models.CharField(primary_key=True, max_length=100)
+ def __unicode__(self):
+ return self.conference_room
class Meta:
db_table = u'conference_room'
@@ -45,6 +49,8 @@
description = models.CharField(max_length=4000)
start_time = models.DateTimeField()
duration = IntervalField()
+ def __unicode__(self):
+ return self.title
class Meta:
db_table = u'event'
@@ -52,8 +58,11 @@
id = models.AutoField(primary_key=True)
file_status_code = models.CharField(unique=True, max_length=1)
file_status_desc = models.CharField(max_length=1000)
+ def __unicode__(self):
+ return u'%s: %s' % (self.file_status_code, self.file_status_desc)
class Meta:
db_table = u'video_file_status'
+ verbose_name_plural = u'video file statuses'
class VideoRecording(models.Model):
id = models.AutoField(primary_key=True)
@@ -65,6 +74,8 @@
file_status = models.ForeignKey(VideoFileStatus)
comments = models.TextField()
locked_by = models.IntegerField()
+ def __unicode__(self):
+ return self.recording_filename
class Meta:
db_table = u'video_recording'
@@ -75,6 +86,8 @@
start_time = IntervalField()
end_time = IntervalField()
event_recording_base_name = models.CharField(max_length=150)
+ def __unicode__(self):
+ return u'"%s" in "%s"' % (self.event, self.recording)
class Meta:
db_table = u'video_event_recording'
@@ -93,6 +106,8 @@
audio_codec_name = models.CharField(max_length=20)
audio_bit_rate = models.IntegerField()
published = models.BooleanField()
+ def __unicode__(self):
+ return self.target_format_abbr
class Meta:
db_table = u'video_target_format'
More information about the Debconf-video-commits
mailing list