summaryrefslogtreecommitdiff
path: root/workshop_app/forms.py
diff options
context:
space:
mode:
authorpnshiralkar2020-05-07 13:58:16 +0530
committerpnshiralkar2020-05-07 13:58:16 +0530
commit198431be862cea5fe369fc07bca3e435ce2f7d79 (patch)
tree662cf8c6bb780b4c5de86539eae3649f83af24b7 /workshop_app/forms.py
parent83be359156350d851950f090dea9906d022e478b (diff)
downloadworkshop_booking-198431be862cea5fe369fc07bca3e435ce2f7d79.tar.gz
workshop_booking-198431be862cea5fe369fc07bca3e435ce2f7d79.tar.bz2
workshop_booking-198431be862cea5fe369fc07bca3e435ce2f7d79.zip
Add workshop types done without attachment files
Diffstat (limited to 'workshop_app/forms.py')
-rw-r--r--workshop_app/forms.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/workshop_app/forms.py b/workshop_app/forms.py
index 334bd4e..fcb34c4 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, ProfileComments, department_choices, title, source, states)
+from .models import (Profile, Workshop, ProfileComments, department_choices, title, source, states, WorkshopType)
try:
from string import letters
@@ -189,3 +189,16 @@ class ProfileCommentsForm(forms.ModelForm):
widgets = {
'comments': forms.CharField(),
}
+
+
+class WorkshopTypeForm(forms.ModelForm):
+ def __init__(self, *args, **kwargs):
+ super(WorkshopTypeForm, self).__init__(*args, **kwargs)
+ for field in self.visible_fields():
+ field.field.widget.attrs['class'] = 'form-control'
+ field.field.widget.attrs['placeholder'] = field.label
+ field.field.widget.attrs['rows'] = 6
+
+ class Meta:
+ model = WorkshopType
+ exclude = []