Commit d67d8ccc5d0dbd3e472037d608e8885f825b4a00

Authored by Jailson Dias
1 parent 3b4913d3

ajustes no template de criar subjects

Showing 1 changed file with 8 additions and 4 deletions   Show diff stats
courses/forms.py
@@ -128,15 +128,19 @@ class SubjectForm(forms.ModelForm): @@ -128,15 +128,19 @@ class SubjectForm(forms.ModelForm):
128 128
129 class Meta: 129 class Meta:
130 model = Subject 130 model = Subject
131 - fields = ('name', 'description', 'visible',) 131 + fields = ('name', 'description','init_date', 'end_date', 'visible',)
132 labels = { 132 labels = {
133 'name': _('Name'), 133 'name': _('Name'),
134 'description': _('Description'), 134 'description': _('Description'),
  135 + 'init_date': _('Start date'),
  136 + 'end_date': _('End date'),
135 'visible': _('Is it visible?'), 137 'visible': _('Is it visible?'),
136 } 138 }
137 help_texts = { 139 help_texts = {
138 'name': _("Subjects's name"), 140 'name': _("Subjects's name"),
139 'description': _("Subjects's description"), 141 'description': _("Subjects's description"),
  142 + 'init_date': _('Start date of the subject'),
  143 + 'end_date': _('End date of the subject'),
140 'visible': _('Is the subject visible?'), 144 'visible': _('Is the subject visible?'),
141 } 145 }
142 146
@@ -184,17 +188,17 @@ class ActivityFileForm(forms.ModelForm): @@ -184,17 +188,17 @@ class ActivityFileForm(forms.ModelForm):
184 model = ActivityFile 188 model = ActivityFile
185 fields = ['pdf','name'] 189 fields = ['pdf','name']
186 190
187 -class ActivityForm(forms.ModelForm): 191 +class ActivityForm(forms.ModelForm):
188 class Meta: 192 class Meta:
189 model = Activity 193 model = Activity
190 fields = ['topic', 'limit_date', 'students','all_students'] 194 fields = ['topic', 'limit_date', 'students','all_students']
191 195
192 -class FileMaterialForm(forms.ModelForm): 196 +class FileMaterialForm(forms.ModelForm):
193 class Meta: 197 class Meta:
194 model = FileMaterial 198 model = FileMaterial
195 fields = ['name', 'file'] 199 fields = ['name', 'file']
196 200
197 -class LinkMaterialForm(forms.ModelForm): 201 +class LinkMaterialForm(forms.ModelForm):
198 class Meta: 202 class Meta:
199 model = LinkMaterial 203 model = LinkMaterial
200 fields = ['material', 'name', 'description','url'] 204 fields = ['material', 'name', 'description','url']