From 3998079d64b706303237dd7ededaab02ab42708c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Wed, 6 Nov 2013 10:59:58 +0100 Subject: [PATCH] Assignment string representation for admin --- wtem/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wtem/models.py b/wtem/models.py index 9e67ad8..877190b 100644 --- a/wtem/models.py +++ b/wtem/models.py @@ -58,3 +58,6 @@ class Assignment(models.Model): for exercise in self.exercises: if not isinstance(exercise, int) or exercise < 1: raise ValidationError(_('Invalid exercise id: %s' % exercise)) + + def __unicode__(self): + return self.user.username + ': ' + ','.join(map(str,self.exercises)) \ No newline at end of file -- 2.20.1