add __unicode__
This commit is contained in:
parent
782432b741
commit
9300095ffc
2 changed files with 10 additions and 0 deletions
|
@ -292,6 +292,7 @@ class Item(models.Model):
|
||||||
if local_posters:
|
if local_posters:
|
||||||
posters['local'] = []
|
posters['local'] = []
|
||||||
for p in local_posters:
|
for p in local_posters:
|
||||||
|
#FIXME: media_url is no longer public
|
||||||
url = p.replace(settings.MEDIA_ROOT, settings.MEDIA_URL)
|
url = p.replace(settings.MEDIA_ROOT, settings.MEDIA_URL)
|
||||||
width = 640
|
width = 640
|
||||||
height = 1024
|
height = 1024
|
||||||
|
|
|
@ -5,11 +5,20 @@ class IDAlias(models.Model):
|
||||||
old = models.CharField(max_length=255, unique=True)
|
old = models.CharField(max_length=255, unique=True)
|
||||||
new = models.CharField(max_length=255)
|
new = models.CharField(max_length=255)
|
||||||
|
|
||||||
|
def __unicode__(self):
|
||||||
|
return u"%s=%s" % (self.old, self.new)
|
||||||
|
|
||||||
class LayerAlias(models.Model):
|
class LayerAlias(models.Model):
|
||||||
old = models.CharField(max_length=255, unique=True)
|
old = models.CharField(max_length=255, unique=True)
|
||||||
new = models.CharField(max_length=255)
|
new = models.CharField(max_length=255)
|
||||||
|
|
||||||
|
def __unicode__(self):
|
||||||
|
return u"%s=%s" % (self.old, self.new)
|
||||||
|
|
||||||
class Alias(models.Model):
|
class Alias(models.Model):
|
||||||
url = models.CharField(max_length=255, unique=True)
|
url = models.CharField(max_length=255, unique=True)
|
||||||
target = models.CharField(max_length=255)
|
target = models.CharField(max_length=255)
|
||||||
|
|
||||||
|
def __unicode__(self):
|
||||||
|
return u"%s=%s" % (self.url, self.target)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue