Commit d8a5d4ada28052775709ea346cb6a079a6145cb7
1 parent
19bb56df
Exists in
master
and in
2 other branches
Removed students and groups field from bulletin, it's for all_students
Showing
1 changed file
with
1 additions
and
8 deletions
Show diff stats
bulletin/forms.py
... | ... | @@ -22,13 +22,12 @@ class BulletinForm(forms.ModelForm): |
22 | 22 | self.subject = self.instance.topic.subject |
23 | 23 | self.initial['tags'] = ", ".join(self.instance.tags.all().values_list("name", flat = True)) |
24 | 24 | |
25 | - self.fields['groups'].queryset = self.subject.group_subject.all() | |
26 | 25 | |
27 | 26 | tags = forms.CharField(label = _('Tags'), required = False) |
28 | 27 | |
29 | 28 | class Meta: |
30 | 29 | model = Bulletin |
31 | - fields = ['name', 'content', 'brief_description', 'all_students', 'groups', 'show_window', 'visible','file_content'] | |
30 | + fields = ['name', 'content', 'brief_description', 'show_window', 'visible','file_content'] | |
32 | 31 | labels = { |
33 | 32 | 'name': _('Bulletin name'), |
34 | 33 | 'content': _('Bulletin content'), |
... | ... | @@ -36,8 +35,6 @@ class BulletinForm(forms.ModelForm): |
36 | 35 | widgets = { |
37 | 36 | 'content': forms.Textarea, |
38 | 37 | 'brief_description': forms.Textarea, |
39 | - 'groups': forms.SelectMultiple, | |
40 | - 'all_students': forms.HiddenInput(), | |
41 | 38 | } |
42 | 39 | |
43 | 40 | def clean_name(self): |
... | ... | @@ -58,10 +55,6 @@ class BulletinForm(forms.ModelForm): |
58 | 55 | |
59 | 56 | return name |
60 | 57 | |
61 | - def clean_all_students(self): | |
62 | - all_students = True | |
63 | - return all_students | |
64 | - | |
65 | 58 | |
66 | 59 | def clean_file_content(self): |
67 | 60 | file_content = self.cleaned_data.get('file_content', False) | ... | ... |