Assignment string representation for admin
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 6 Nov 2013 09:59:58 +0000 (10:59 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 15 Jan 2014 10:18:54 +0000 (11:18 +0100)
wtem/models.py

index 9e67ad8..877190b 100644 (file)
@@ -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