.
This commit is contained in:
@@ -61,6 +61,17 @@ class LongCreationDefaultForm(ModelForm):
|
|||||||
exclude = ["author"]
|
exclude = ["author"]
|
||||||
|
|
||||||
class LongSeriesForm(ModelForm):
|
class LongSeriesForm(ModelForm):
|
||||||
|
class Media:
|
||||||
|
# Django also includes a few javascript files necessary
|
||||||
|
# for the operation of this form element. You need to
|
||||||
|
# include <script src="/admin/jsi18n"></script>
|
||||||
|
# in the template.
|
||||||
|
css = {
|
||||||
|
"all": ["css/widgets.css"],
|
||||||
|
}
|
||||||
|
# Adding this javascript is crucial
|
||||||
|
js = ["jsi18n.js", "tesseract.min.js"]
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(LongSeriesForm, self).__init__(*args, **kwargs)
|
super(LongSeriesForm, self).__init__(*args, **kwargs)
|
||||||
self.fields["examination"] = ModelChoiceField(
|
self.fields["examination"] = ModelChoiceField(
|
||||||
|
|||||||
Reference in New Issue
Block a user