summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2013-08-29 15:39:44 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2013-08-29 15:39:44 +0200
commitd323cdcbf698fefa9f2d29589261d0757f4417c9 (patch)
tree2b85c3e81e5b7849c962502fbe1d654094443865 /ishtar_common
parentd48e91db62ec07eb11fbc8b6b5360ef7a45c4cd0 (diff)
downloadIshtar-d323cdcbf698fefa9f2d29589261d0757f4417c9.tar.bz2
Ishtar-d323cdcbf698fefa9f2d29589261d0757f4417c9.zip
Make all "short_label" properties (refs #1370)
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py1
-rw-r--r--ishtar_common/wizards.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 3f0cdc6b4..0a7c3e1f9 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -168,6 +168,7 @@ class GeneralType(models.Model):
def __unicode__(self):
return self.label
+ @property
def short_label(self):
return self.label
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index e3df00771..b04ef48ee 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -214,7 +214,7 @@ class Wizard(NamedUrlWizardView):
for val in values:
item = associated_models[key].objects.get(pk=val)
if hasattr(item, 'short_label'):
- value = item.short_label()
+ value = item.short_label
else:
value = unicode(item)
rendered_values.append(value)