summaryrefslogtreecommitdiff
path: root/workshop_app/forms.py
diff options
context:
space:
mode:
authorpnshiralkar2020-05-18 20:51:47 +0530
committerpnshiralkar2020-05-18 20:51:47 +0530
commit5d8b002b48da791b090314a2df3e500734b5b62f (patch)
tree6e037ca08fa4e8f9c57920562615a3f0b136c1ce /workshop_app/forms.py
parenta950ed30df4186cee4f08cbde8ad8a210d134e8b (diff)
downloadworkshop_booking-5d8b002b48da791b090314a2df3e500734b5b62f.tar.gz
workshop_booking-5d8b002b48da791b090314a2df3e500734b5b62f.tar.bz2
workshop_booking-5d8b002b48da791b090314a2df3e500734b5b62f.zip
Renamed model WorkshopComments to Comments and added hidden tag to the non-public comments
Diffstat (limited to 'workshop_app/forms.py')
-rw-r--r--workshop_app/forms.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/workshop_app/forms.py b/workshop_app/forms.py
index 6099a76..95b0ce1 100644
--- a/workshop_app/forms.py
+++ b/workshop_app/forms.py
@@ -3,7 +3,7 @@ from string import punctuation, digits
from django import forms
from django.utils import timezone
-from .models import (Profile, Workshop, department_choices, title, source, states, WorkshopComment)
+from .models import (Profile, Workshop, department_choices, title, source, states, Comment)
try:
from string import letters
@@ -170,19 +170,19 @@ class WorkshopForm(forms.ModelForm):
}
-class WorkshopCommentsForm(forms.ModelForm):
+class CommentsForm(forms.ModelForm):
"""
Users will post comments on workshops
"""
def __init__(self, *args, **kwargs):
kwargs.setdefault('label_suffix', '')
- super(WorkshopCommentsForm, self).__init__(*args, **kwargs)
+ super(CommentsForm, self).__init__(*args, **kwargs)
self.fields['comment'].required = True
self.fields['public'].label = "Public"
class Meta:
- model = WorkshopComment
+ model = Comment
exclude = ['author', 'created_date', 'workshop']
widgets = {
'comment': forms.Textarea(attrs={