Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add __unicode__ for Video2013 model.

  • Loading branch information...
commit 5d79ed4e6dfa184478f5bda0ea92c5f592b4abe1 1 parent f80108f
@Osmose Osmose authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 flicks/videos/models.py
View
5 flicks/videos/models.py
@@ -58,6 +58,11 @@ def embed_html(self, **kwargs):
def thumbnail(self, size):
return getattr(self, '{0}_thumbnail_url'.format(size), '')
+ def __unicode__(self):
+ profile = self.user.profile
+ name = profile.display_name if profile else self.user.email
+ return '`{0}` - {1}'.format(self.title, name)
+
@receiver(models.signals.post_delete, sender=Video2013)
def remove_video(sender, **kwargs):
Please sign in to comment.
Something went wrong with that request. Please try again.