summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 9b6f94907..3ca830aa3 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -38,8 +38,6 @@ from django.contrib import admin
from simple_history.models import HistoricalRecords as BaseHistoricalRecords
-JOINT = u" - "
-
def post_save_user(sender, **kwargs):
user = kwargs['instance']
ishtaruser = None
@@ -499,7 +497,7 @@ class Department(models.Model):
ordering = ['number']
def __unicode__(self):
- return unicode(self.number) + JOINT + self.label
+ return unicode(self.number) + settings.JOINT + self.label
class Address(BaseHistorizedItem):
address = models.TextField(_(u"Address"), null=True, blank=True)
@@ -574,11 +572,10 @@ class Person(Address, OwnPerms) :
def __unicode__(self):
lbl = u"%s %s" % (self.name, self.surname)
- lbl += JOINT
if self.attached_to:
- lbl += unicode(self.attached_to)
+ lbl += settings.JOINT + unicode(self.attached_to)
elif self.email:
- lbl += self.email
+ lbl += settings.JOINT + self.email
return lbl
def full_label(self):
@@ -624,7 +621,7 @@ class Author(models.Model):
verbose_name_plural = _(u"Authors")
def __unicode__(self):
- return unicode(self.person) + JOINT + unicode(self.author_type)
+ return unicode(self.person) + settings.JOINT + unicode(self.author_type)
class SourceType(GeneralType):
class Meta:
@@ -655,14 +652,14 @@ if settings.COUNTRY == 'fr':
department = models.ForeignKey(Department, verbose_name=u"Département")
def __unicode__(self):
- return JOINT.join((self.name, unicode(self.department)))
+ return settings.JOINT.join((self.name, unicode(self.department)))
class Canton(models.Model):
name = models.CharField(u"Nom", max_length=30)
arrondissement = models.ForeignKey(Arrondissement,
verbose_name=u"Arrondissement")
def __unicode__(self):
- return JOINT.join((self.name, unicode(self.arrondissement)))
+ return settings.JOINT.join((self.name, unicode(self.arrondissement)))
class Town(models.Model):
name = models.CharField(_(u"Name"), max_length=100)