Skip to content

Commit fa639aa

Browse files
committed
Add some unicode methods
- Legacy-Id: 3819
1 parent 04bce10 commit fa639aa

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

redesign/group/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class GroupURL(models.Model):
5757
group = models.ForeignKey(Group)
5858
name = models.CharField(max_length=255)
5959
url = models.URLField(verify_exists=False)
60+
def __unicode__(self):
61+
return u"%s (%s)" % (self.url, self.name)
6062

6163
class GroupMilestone(models.Model):
6264
group = models.ForeignKey(Group)
@@ -77,6 +79,9 @@ class GroupStateTransitions(models.Model):
7779
state = models.ForeignKey('doc.State', help_text="State for which the next states should be overridden")
7880
next_states = models.ManyToManyField('doc.State', related_name='previous_groupstatetransitions_states')
7981

82+
def __unicode__(self):
83+
return u'%s "%s" -> %s' % (self.group.acronym, self.state.name, [s.name for s in self.next_states.all()])
84+
8085
GROUP_EVENT_CHOICES = [
8186
("changed_state", "Changed state"),
8287
("added_comment", "Added comment"),

0 commit comments

Comments
 (0)