From ef915e580645cb4fa07aa2ff1a310bcc5cc6ae5d Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 5 Feb 2021 12:01:08 +0000 Subject: [PATCH] . --- longs/forms.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/longs/forms.py b/longs/forms.py index 8a94dca2..2bc89dce 100755 --- a/longs/forms.py +++ b/longs/forms.py @@ -61,6 +61,17 @@ class LongCreationDefaultForm(ModelForm): exclude = ["author"] class LongSeriesForm(ModelForm): + class Media: + # Django also includes a few javascript files necessary + # for the operation of this form element. You need to + # include + # in the template. + css = { + "all": ["css/widgets.css"], + } + # Adding this javascript is crucial + js = ["jsi18n.js", "tesseract.min.js"] + def __init__(self, *args, **kwargs): super(LongSeriesForm, self).__init__(*args, **kwargs) self.fields["examination"] = ModelChoiceField(