From 9300095ffc9de705e5eb9ef8a8824f7af3f93916 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 21 Jan 2011 17:35:43 +0530 Subject: [PATCH] add __unicode__ --- pandora/item/models.py | 1 + pandora/urlalias/models.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index 2d1fdb19e..53aafcbf3 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -292,6 +292,7 @@ class Item(models.Model): if local_posters: posters['local'] = [] for p in local_posters: + #FIXME: media_url is no longer public url = p.replace(settings.MEDIA_ROOT, settings.MEDIA_URL) width = 640 height = 1024 diff --git a/pandora/urlalias/models.py b/pandora/urlalias/models.py index 38772ee67..5cd491f6b 100644 --- a/pandora/urlalias/models.py +++ b/pandora/urlalias/models.py @@ -5,11 +5,20 @@ class IDAlias(models.Model): old = models.CharField(max_length=255, unique=True) new = models.CharField(max_length=255) + def __unicode__(self): + return u"%s=%s" % (self.old, self.new) + class LayerAlias(models.Model): old = models.CharField(max_length=255, unique=True) new = models.CharField(max_length=255) + def __unicode__(self): + return u"%s=%s" % (self.old, self.new) + class Alias(models.Model): url = models.CharField(max_length=255, unique=True) target = models.CharField(max_length=255) + def __unicode__(self): + return u"%s=%s" % (self.url, self.target) +