aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--servo/models/account.py2
-rw-r--r--servo/models/common.py2
-rw-r--r--servo/models/customer.py4
-rw-r--r--servo/models/parts.py2
-rw-r--r--servo/models/purchases.py2
-rw-r--r--servo/models/repair.py6
-rw-r--r--servo/models/rules.py6
-rw-r--r--servo/models/shipments.py2
8 files changed, 13 insertions, 13 deletions
diff --git a/servo/models/account.py b/servo/models/account.py
index b86c877..f72555b 100644
--- a/servo/models/account.py
+++ b/servo/models/account.py
@@ -259,7 +259,7 @@ class User(AbstractUser):
def get_admin_url(self):
return reverse('admin-edit_user', args=[self.pk])
- def __unicode__(self):
+ def __str__(self):
return self.get_name() or self.username
class Meta:
diff --git a/servo/models/common.py b/servo/models/common.py
index f92485e..7339f4f 100644
--- a/servo/models/common.py
+++ b/servo/models/common.py
@@ -510,7 +510,7 @@ class Location(models.Model):
'emailAddress' : self.email,
}
- def __unicode__(self):
+ def __str__(self):
return self.title
class Meta:
diff --git a/servo/models/customer.py b/servo/models/customer.py
index f83515d..9d81371 100644
--- a/servo/models/customer.py
+++ b/servo/models/customer.py
@@ -31,7 +31,7 @@ class CustomerGroup(models.Model):
self.slug = slugify(self.name)
super(CustomerGroup, self).save()
- def __unicode__(self):
+ def __str__(self):
return self.name
class Meta:
@@ -285,7 +285,7 @@ class Customer(MPTTModel):
class MPTTMeta:
order_insertion_by = ['name']
- def __unicode__(self):
+ def __str__(self):
return self.name
diff --git a/servo/models/parts.py b/servo/models/parts.py
index e1e099d..26fbfcf 100644
--- a/servo/models/parts.py
+++ b/servo/models/parts.py
@@ -413,7 +413,7 @@ class ServicePart(models.Model):
super(ServicePart, self).save(*args, **kwargs)
- def __unicode__(self):
+ def __str__(self):
return u'ServicePart %s' % self.part_number
class Meta:
diff --git a/servo/models/purchases.py b/servo/models/purchases.py
index 8d4fcac..e096567 100644
--- a/servo/models/purchases.py
+++ b/servo/models/purchases.py
@@ -318,7 +318,7 @@ class PurchaseOrderItem(AbstractOrderItem):
self.order_item.save()
- def __unicode__(self):
+ def __str__(self):
return self.code
class Meta:
diff --git a/servo/models/repair.py b/servo/models/repair.py
index 6af3d32..706501c 100644
--- a/servo/models/repair.py
+++ b/servo/models/repair.py
@@ -40,7 +40,7 @@ class Checklist(models.Model):
def get_admin_url(self):
return reverse('admin-edit_checklist', args=[self.pk])
- def __unicode__(self):
+ def __str__(self):
return self.title
class Meta:
@@ -66,7 +66,7 @@ class ChecklistItem(models.Model):
)
"""
- def __unicode__(self):
+ def __str__(self):
return self.title
class Meta:
@@ -693,7 +693,7 @@ class Repair(models.Model):
return reverse(url, args=[self.order.pk, self.pk])
- def __unicode__(self):
+ def __str__(self):
if self.pk is not None:
return _("Repair %d") % self.pk
diff --git a/servo/models/rules.py b/servo/models/rules.py
index f2ffa6a..37a7bff 100644
--- a/servo/models/rules.py
+++ b/servo/models/rules.py
@@ -75,7 +75,7 @@ class Rule(ServoModel):
for a in self.action_set.all():
a.apply(order, event)
- def __unicode__(self):
+ def __str__(self):
return self.description
@@ -113,7 +113,7 @@ class Condition(ServoModel):
d['value'] = self.value
return d
- def __unicode__(self):
+ def __str__(self):
return '%s %s %s' % (self.key, self.operator, self.value)
@@ -148,7 +148,7 @@ class Action(ServoModel):
if self.key == 'SET_USER':
order.set_user(self.value, event.triggered_by)
- def __unicode__(self):
+ def __str__(self):
return '%s %s' % (self.key, self.value)
diff --git a/servo/models/shipments.py b/servo/models/shipments.py
index 9dba9b3..4daa6e2 100644
--- a/servo/models/shipments.py
+++ b/servo/models/shipments.py
@@ -183,7 +183,7 @@ class Shipment(models.Model):
super(Shipment, self).save(*args, **kwargs)
- def __unicode__(self):
+ def __str__(self):
return u'Shipment #%s from %s' % (self.pk, self.location.title)
class Meta: