diff options
author | Akshen | 2018-08-03 16:15:37 +0530 |
---|---|---|
committer | Akshen | 2018-08-03 16:15:37 +0530 |
commit | 802ab05a0cd4fbf197b014664d5bb70907862aef (patch) | |
tree | 2934378ef57fb473168747b49d603b863d426f90 /workshop_app/forms.py | |
parent | c7a9b030449408efda3cd554aaa9138ebbcf8ae3 (diff) | |
download | workshop_booking-802ab05a0cd4fbf197b014664d5bb70907862aef.tar.gz workshop_booking-802ab05a0cd4fbf197b014664d5bb70907862aef.tar.bz2 workshop_booking-802ab05a0cd4fbf197b014664d5bb70907862aef.zip |
Allow instructors to post comments on coordinator's profile
This commit will allow instructors to view and post comments on coordinators profile
Auto-logout time increased
Diffstat (limited to 'workshop_app/forms.py')
-rw-r--r-- | workshop_app/forms.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/workshop_app/forms.py b/workshop_app/forms.py index bbc2811..68ada33 100644 --- a/workshop_app/forms.py +++ b/workshop_app/forms.py @@ -2,7 +2,8 @@ from django import forms from django.utils import timezone from .models import ( Profile, User, Workshop, WorkshopType, - RequestedWorkshop, BookedWorkshop, ProposeWorkshopDate + RequestedWorkshop, BookedWorkshop, ProposeWorkshopDate, + ProfileComments ) from string import punctuation, digits try: @@ -263,3 +264,25 @@ class ProposeWorkshopDateForm(forms.ModelForm): 'proposed_workshop_date': forms.DateInput(attrs={ 'class':'datepicker'}) } + + + +class ProfileCommentsForm(forms.ModelForm): + """ + Instructors will post comments on Coordinators profile + """ + + def __init__(self, *args, **kwargs): + super(ProfileCommentsForm, self).__init__(*args, **kwargs) + self.fields['comment'].label = "" + self.fields['comment'].widget.attrs['rows'] = 5 + self.fields['comment'].widget.attrs['cols'] = 95 + + class Meta: + model = ProfileComments + exclude = ['coordinator_profile', 'instructor_profile', + 'created_date' + ] + widgets = { + 'comments' : forms.CharField(), + }
\ No newline at end of file |