From: Aleksander Ɓukasz Date: Wed, 6 Nov 2013 09:59:58 +0000 (+0100) Subject: Assignment string representation for admin X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/3998079d64b706303237dd7ededaab02ab42708c?ds=sidebyside;hp=a5255a7dad7389d26a90a72072e8c39cfe5e469e Assignment string representation for admin --- 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