Skip to content

Commit

Permalink
Give channels a __str__
Browse files Browse the repository at this point in the history
  • Loading branch information
Octowl committed Aug 13, 2018
1 parent 54a4d78 commit 7b35a5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions my_messages/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ class Channel(models.Model):
name = models.CharField(unique=True, max_length=120)
owner = models.ForeignKey(User, on_delete=models.CASCADE)

def __str__(self):
return self.name


class Message(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
Expand Down

0 comments on commit 7b35a5c

Please sign in to comment.