Prevent duplicate form media loading..
..by setting BaseCaseStudyForm.helper.include_media = False
This commit is contained in:
parent
f8695fae3c
commit
7436fa7e2e
@ -27,6 +27,7 @@ class BaseCaseStudyForm(forms.models.ModelForm):
|
|||||||
self.helper.form_action = 'add'
|
self.helper.form_action = 'add'
|
||||||
self.helper.label_class = 'col-lg-2'
|
self.helper.label_class = 'col-lg-2'
|
||||||
self.helper.field_class = 'col-lg-8'
|
self.helper.field_class = 'col-lg-8'
|
||||||
|
self.helper.include_media = False
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = CaseStudy
|
model = CaseStudy
|
||||||
@ -126,7 +127,7 @@ class LongCaseStudyForm(BaseCaseStudyForm):
|
|||||||
|
|
||||||
POSITIVE_CASE_TYPE_CHOICES = [
|
POSITIVE_CASE_TYPE_CHOICES = [
|
||||||
(choice[0], mark_safe('<b>%s</b><br><span class="text-muted">%s</span>' % (choice[1], self.POSITIVE_CASE_TYPE_HELP[choice[0]])))
|
(choice[0], mark_safe('<b>%s</b><br><span class="text-muted">%s</span>' % (choice[1], self.POSITIVE_CASE_TYPE_HELP[choice[0]])))
|
||||||
for choice in CaseStudy.POSITIVE_CASE_TYPE_CHOICES
|
for choice in CaseStudy.POSITIVE_CASE_TYPE_CHOICES
|
||||||
]
|
]
|
||||||
|
|
||||||
self.fields['positive_case_type'] = forms.ChoiceField(
|
self.fields['positive_case_type'] = forms.ChoiceField(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user