diff options
-rw-r--r-- | maconomy/models.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/maconomy/models.py b/maconomy/models.py index 820014d..75c039f 100644 --- a/maconomy/models.py +++ b/maconomy/models.py @@ -9,14 +9,17 @@ class Employee: def from_result(cls, result): id, name, email = result[:3] return cls(id, name, email) - + def __unicode__(self): if type(self.name) is not unicode: - name = unicode(self.name,"ISO-8859-1") + name = unicode(self.name, "ISO-8859-1") else: name = self.name return u"{} ({})".format(name, self.id) + def __str__(self): + return "{} ({})".format(self.name, self.id) + class Timesheet: def __init__(self, week, submitted, approved, employee, approver): |