Added str func in announcement model to return title

parent af2bacec
......@@ -4,4 +4,7 @@ from django.db import models
class Announcement(models.Model):
announcement_title = models.CharField(max_length=50)
announcement_body = models.CharField(max_length=500)
pub_date = models.DateTimeField("date published")
\ No newline at end of file
pub_date = models.DateTimeField("date published")
def __str__(self):
return self.announcement_title
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment