Commit 56cbc539 authored by Cherish Magpayo's avatar Cherish Magpayo

Add image file field to Announcement Model

parent 7e74e691
...@@ -8,6 +8,7 @@ class Announcement(models.Model): ...@@ -8,6 +8,7 @@ class Announcement(models.Model):
announcement_body = models.CharField(max_length=500) announcement_body = models.CharField(max_length=500)
pub_date = models.DateTimeField(auto_now_add=True) pub_date = models.DateTimeField(auto_now_add=True)
author = models.ForeignKey(WidgetUser, on_delete=models.CASCADE, default=1) author = models.ForeignKey(WidgetUser, on_delete=models.CASCADE, default=1)
image = models.FileField(upload_to='static/announcements/', blank=True, null=True)
def __str__(self): def __str__(self):
return self.announcement_title return self.announcement_title
......
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