Private
Public Access
1
0

comment notifications

This commit is contained in:
Sander Roosendaal
2017-02-23 12:13:55 +01:00
parent edf9709fa2
commit 27acec196a
6 changed files with 101 additions and 9 deletions

View File

@@ -891,6 +891,7 @@ class WorkoutComment(models.Model):
comment = models.TextField(max_length=300)
created = models.DateTimeField(default=timezone.now)
read = models.BooleanField(default=False)
notification = models.BooleanField(default=False,verbose_name="Send me notifications")
user = models.ForeignKey(User)
workout = models.ForeignKey(Workout)
@@ -905,7 +906,7 @@ class WorkoutComment(models.Model):
class WorkoutCommentForm(ModelForm):
class Meta:
model = WorkoutComment
fields = ['comment',]
fields = ['comment','notification']
widgets = {
'comment': forms.Textarea,
}