From d8a5d4ada28052775709ea346cb6a079a6145cb7 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Thu, 27 Jul 2017 20:06:04 -0300 Subject: [PATCH] Removed students and groups field from bulletin, it's for all_students --- bulletin/forms.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bulletin/forms.py b/bulletin/forms.py index dbd318c..891f930 100644 --- a/bulletin/forms.py +++ b/bulletin/forms.py @@ -22,13 +22,12 @@ class BulletinForm(forms.ModelForm): self.subject = self.instance.topic.subject self.initial['tags'] = ", ".join(self.instance.tags.all().values_list("name", flat = True)) - self.fields['groups'].queryset = self.subject.group_subject.all() tags = forms.CharField(label = _('Tags'), required = False) class Meta: model = Bulletin - fields = ['name', 'content', 'brief_description', 'all_students', 'groups', 'show_window', 'visible','file_content'] + fields = ['name', 'content', 'brief_description', 'show_window', 'visible','file_content'] labels = { 'name': _('Bulletin name'), 'content': _('Bulletin content'), @@ -36,8 +35,6 @@ class BulletinForm(forms.ModelForm): widgets = { 'content': forms.Textarea, 'brief_description': forms.Textarea, - 'groups': forms.SelectMultiple, - 'all_students': forms.HiddenInput(), } def clean_name(self): @@ -58,10 +55,6 @@ class BulletinForm(forms.ModelForm): return name - def clean_all_students(self): - all_students = True - return all_students - def clean_file_content(self): file_content = self.cleaned_data.get('file_content', False) -- libgit2 0.21.2