summaryrefslogtreecommitdiff
path: root/workshop_app/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'workshop_app/models.py')
-rw-r--r--workshop_app/models.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/workshop_app/models.py b/workshop_app/models.py
index b43600f..d690a7e 100644
--- a/workshop_app/models.py
+++ b/workshop_app/models.py
@@ -200,26 +200,26 @@ class Testimonial(models.Model):
)
-class ProfileComments(models.Model):
+class Comment(models.Model):
"""
- Contains comments posted by instructors on coordinator profile
+ Contains comments posted by users on workshop instances
"""
- coordinator = models.ForeignKey(User,
- on_delete=models.CASCADE)
+ author = models.ForeignKey(User, on_delete=models.CASCADE)
comment = models.TextField()
- instructor = models.ForeignKey(User, related_name="%(app_label)s_%(class)s_related", on_delete=models.CASCADE)
+ public = models.BooleanField(default=True)
created_date = models.DateTimeField(default=timezone.now)
+ workshop = models.ForeignKey(Workshop, on_delete=models.CASCADE)
def __str__(self):
- return u"{0} | {1}".format(
+ return u"{0} | {1} | {2}".format(
self.comment,
self.created_date,
- self.coordinator,
- self.instructor
+ self.author,
)
+
class Banner(models.Model):
"""
Add HTML for banner display on homepage